ocvalidate: Fix the check logic for PickerVariant length calculation
@@ -252,7 +252,9 @@ CheckMiscBoot (
//
// Check the length of path relative to OC directory.
//
- if (StrLen (OPEN_CORE_IMAGE_PATH) + AsciiStrSize (PickerVariant) > OC_STORAGE_SAFE_PATH_MAX) {
+ // There is one missing '\\' after the concatenation of PickerVariant and ExtAppleRecv10_15.icns (which has the longest length). Append one.
+ //
+ if (StrLen (OPEN_CORE_IMAGE_PATH) + AsciiStrLen (PickerVariant) + 1 + AsciiStrSize ("ExtAppleRecv10_15.icns") > OC_STORAGE_SAFE_PATH_MAX) {
DEBUG ((DEBUG_WARN, "Misc->Boot->PickerVariant is too long (should not exceed %u)!\n", OC_STORAGE_SAFE_PATH_MAX));
++ErrorCount;
}
