efi_loader: correct EFI_DEBUG_TABLE_ENTRY_SIZE
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 8 Jul 2025 11:14:35 +0000 (13:14 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 26 Jul 2025 05:37:03 +0000 (07:37 +0200)
commit7e2506e3a247c787a9ad4b4db00bc8e6a348df90
tree3e3d34e5c3c8bfb5222e5f32a95a19191375bffc
parentaa703a816a62deb876a1e77ccff030a7cc60f344
efi_loader: correct EFI_DEBUG_TABLE_ENTRY_SIZE

With the current code we allocate to little memory when adding entries to
the EFI_DEBUG_INFO_TABLE and we fail to correctly move entries when an
entry is removed.

EFI_DEBUG_TABLE_ENTRY_SIZE must be the size of an entry in the
EFI_DEBUG_INFO_TABLE, not the size of a pointer.

Fixes: 146546138af5 ("efi: add EFI_DEBUG_IMAGE_INFO for debug")
Addresses-Coverity-ID: CID 569498: Code maintainability issues (SIZEOF_MISMATCH)
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_debug_support.c