]> git.ipfire.org Git - thirdparty/u-boot.git/commit
efi_loader: fix efi_debug_image_info_normal allocation
authorVincent Stehlé <vincent.stehle@arm.com>
Tue, 3 Feb 2026 12:59:41 +0000 (13:59 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 6 Feb 2026 08:57:00 +0000 (09:57 +0100)
commite94d0bd82761b7b41bc061368a11684f19130954
treedfa3f5c7ebacf4a484e6c2329eea1130553e0cd1
parent32b835ccf3db8ae393c1ff27a9a367f7b6edd78f
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é <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_debug_support.c