Bootmgr (Linux): fix secure boot testing

Fix #1584
This commit is contained in:
Carter Li
2025-02-24 13:57:33 +08:00
parent 4e17688b7c
commit 3d6bd26e59
+1 -1
View File
@@ -20,7 +20,7 @@ const char* ffDetectBootmgr(FFBootmgrResult* result)
ffEfiFillLoadOption((FFEfiLoadOption *)&buffer[4], result);
if (ffReadFileData(FF_EFIVARS_PATH_PREFIX "SecureBoot-" FF_EFI_GLOBAL_GUID, sizeof(buffer), buffer) == 6)
if (ffReadFileData(FF_EFIVARS_PATH_PREFIX "SecureBoot-" FF_EFI_GLOBAL_GUID, sizeof(buffer), buffer) >= 5)
result->secureBoot = buffer[4] == 1;
return NULL;