summaryrefslogtreecommitdiff
path: root/lib/efi_loader
diff options
context:
space:
mode:
authorVincent StehlĂ© <[email protected]>2026-02-03 13:59:41 +0100
committerHeinrich Schuchardt <[email protected]>2026-02-06 09:57:00 +0100
commite94d0bd82761b7b41bc061368a11684f19130954 (patch)
treedfa3f5c7ebacf4a484e6c2329eea1130553e0cd1 /lib/efi_loader
parent32b835ccf3db8ae393c1ff27a9a367f7b6edd78f (diff)
efi_loader: fix efi_debug_image_info_normal allocation
When adding a new EFI Debug Image Info entry, we allocate memory for a new EFI Debug Image Info Normal structure and we add a new entry into the EFI Debug Image Info Table, which is in fact just a pointer to the allocated structure. However, when allocating memory for the new structure we allocate memory for the wrong type, leading to allocating memory for just a pointer instead of the desired structure. Fix the type used during allocation. Fixes: 146546138af5 ("efi: add EFI_DEBUG_IMAGE_INFO for debug") Signed-off-by: Vincent StehlĂ© <[email protected]> Cc: Heinrich Schuchardt <[email protected]> Cc: Ilias Apalodimas <[email protected]> Cc: Tom Rini <[email protected]> Cc: Ying-Chun Liu (PaulLiu) <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r--lib/efi_loader/efi_debug_support.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_debug_support.c b/lib/efi_loader/efi_debug_support.c
index 490b0bb7088..8d0c133871e 100644
--- a/lib/efi_loader/efi_debug_support.c
+++ b/lib/efi_loader/efi_debug_support.c
@@ -111,7 +111,7 @@ efi_status_t efi_core_new_debug_image_info_entry(u32 image_info_type,
/* Allocate data for new entry. */
ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA,
- sizeof(union efi_debug_image_info),
+ sizeof(struct efi_debug_image_info_normal),
(void **)(&(*table)[index].normal_image));
if (ret == EFI_SUCCESS && (*table)[index].normal_image) {
/* Update the entry. */