efi: Fix broken assignments of handles_size
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);
