From 369e2eff10d8028c4fa682223d4a4b2005d8b41a Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 29 Mar 2021 14:14:56 -0400 Subject: [PATCH] Fix an off-by-one on the sbat self-check. Signed-off-by: Peter Jones --- shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shim.c b/shim.c index b00fa5fc3..c5cfbb830 100644 --- a/shim.c +++ b/shim.c @@ -1956,7 +1956,7 @@ efi_main (EFI_HANDLE passed_image_handle, EFI_SYSTEM_TABLE *passed_systab) goto die; } - efi_status = handle_sbat(sbat_start, sbat_end - sbat_start); + efi_status = handle_sbat(sbat_start, sbat_end - sbat_start - 1); if (EFI_ERROR(efi_status)) { perror(L"Verifiying shim SBAT data failed: %r\n", efi_status);