mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-24 13:24:02 +00:00
kern/elf: fix unintended sign extension
Found by: Coverity scan. CID: 73729, 73735, 73758, 73760
This commit is contained in:
parent
aafd205c92
commit
9fecb0588e
@ -12,7 +12,7 @@ grub_elfXX_load_phdrs (grub_elf_t elf)
|
||||
if (elf->phdrs)
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
phdrs_size = elf->ehdr.ehdrXX.e_phnum * elf->ehdr.ehdrXX.e_phentsize;
|
||||
phdrs_size = (grub_uint32_t) elf->ehdr.ehdrXX.e_phnum * elf->ehdr.ehdrXX.e_phentsize;
|
||||
|
||||
grub_dprintf ("elf", "Loading program headers at 0x%llx, size 0x%lx.\n",
|
||||
(unsigned long long) elf->ehdr.ehdrXX.e_phoff,
|
||||
|
Loading…
Reference in New Issue
Block a user