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.zig...@cloud.com> --- grub-core/loader/efi/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index 5befce4d7..3b5c4ed17 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c @@ -190,7 +190,7 @@ grub_arch_efi_linux_boot_image (grub_addr_t addr, grub_size_t size, char *args) grub_efi_boot_services_t *b; grub_efi_status_t status; grub_efi_loaded_image_t *loaded_image; - int len; + grub_size_t len; mempath = grub_malloc (2 * sizeof (grub_efi_memory_mapped_device_path_t)); if (!mempath) -- 2.49.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel