kern/elf: fix unintended sign extension

Found by: Coverity scan.
CID: 73729, 73735, 73758, 73760
This commit is contained in:
Andrei Borzenkov 2016-01-09 19:41:26 +03:00
parent aafd205c92
commit 9fecb0588e
1 changed files with 1 additions and 1 deletions

View File

@ -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,