]> git.ipfire.org Git - thirdparty/grub.git/commit
loader/efi/linux: Use proper type for len variable
authorFrediano Ziglio <frediano.ziglio@cloud.com>
Wed, 25 Jun 2025 13:42:41 +0000 (14:42 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 26 Jun 2025 16:05:08 +0000 (18:05 +0200)
commitc2b2e0dcf577bab02e4402ed47599053a81f536c
tree71ffd7543b989d868b0f2bedfbe0d3900555d3ae
parentde4e8e2aa6d181096193edd137aa07608f746d24
loader/efi/linux: Use proper type for len variable

Although the length should not exceed 2^31 grub_size_t is more
suitable for that variable. len is used to compute the size
of buffers which in C is a size_t, not a int. It is used
for GRUB_EFI_BYTES_TO_PAGES which expects unsigned values.
It is assigned to load_options_size which is unsigned, not signed.

Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/efi/linux.c