From 4d70bbd894f9f244a809b3d965eb1c3a8b27b9fa Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 17 Nov 2015 11:40:29 -0500 Subject: [PATCH] shim: check for EFI\BOOT\BOOT${ARCH}.EFI as well as the leading \ version I found a machine whose BDS gives us relative paths, yay! The rest of the code still works without that leading slash, so just make it one more item we let through our StrnCaseCmp() filter. Signed-off-by: Peter Jones --- shim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shim.c b/shim.c index d64d15b..c93d96d 100644 --- a/shim.c +++ b/shim.c @@ -1290,7 +1290,9 @@ should_use_fallback(EFI_HANDLE image_handle) * L"\\EFI\\BOOT\\/BOOTX64.EFI". So just handle that here... */ if (StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\BOOT", 14) && - StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\/BOOT", 15)) + StrnCaseCmp(bootpath, L"\\EFI\\BOOT\\/BOOT", 15) && + StrnCaseCmp(bootpath, L"EFI\\BOOT\\BOOT", 13) && + StrnCaseCmp(bootpath, L"EFI\\BOOT\\/BOOT", 14)) goto error; pathlen = StrLen(bootpath);