From 55199478db4424543cede693fbcd20792c1fceb0 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Fri, 1 Jul 2022 09:07:45 +0200 Subject: [PATCH] efi: Fix broken assignments of handles_size --- common/drivers/disk.s2.c | 2 +- common/drivers/edid.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/drivers/disk.s2.c b/common/drivers/disk.s2.c index 6e4d457a..c879ce6b 100644 --- a/common/drivers/disk.s2.c +++ b/common/drivers/disk.s2.c @@ -393,7 +393,7 @@ void disk_create_index(void) { EFI_GUID block_io_guid = BLOCK_IO_PROTOCOL; EFI_HANDLE *handles = tmp_handles; - UINTN handles_size = 1; + UINTN handles_size = sizeof(EFI_HANDLE); status = gBS->LocateHandle(ByProtocol, &block_io_guid, NULL, &handles_size, handles); diff --git a/common/drivers/edid.c b/common/drivers/edid.c index 1de88f2e..f1247325 100644 --- a/common/drivers/edid.c +++ b/common/drivers/edid.c @@ -57,7 +57,7 @@ struct edid_info_struct *get_edid_info(void) { EFI_HANDLE tmp_handles[1]; EFI_HANDLE *handles = tmp_handles; - UINTN handles_size = 1; + UINTN handles_size = sizeof(EFI_HANDLE); EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; status = gBS->LocateHandle(ByProtocol, &gop_guid, NULL, &handles_size, handles);