libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit e9345f19a5c035597de2edba17788a543ccb501d
parent e20cc5764e49be329e17c4fa80be31f9cf6ea412
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 21 Dec 2009 11:43:28 +0000

fixing CID 205

Diffstat:
Msrc/plugins/elf_extractor.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/elf_extractor.c b/src/plugins/elf_extractor.c @@ -420,9 +420,9 @@ getELFHdr (const char *data, EXTRACTOR_common_cat_unpack (&data[EI_NIDENT], ELF64_HEADER_SPECS[getByteorder (data[EI_DATA])], ELF64_HEADER_FIELDS (ehdr64)); - if (ehdr64->e_shoff + ehdr64->e_shentsize * ehdr64->e_shnum > size) + if (ehdr64->e_shoff + ((uint32_t) ehdr64->e_shentsize * ehdr64->e_shnum) > size) return -1; /* invalid offsets... */ - if (ehdr64->e_phoff + ehdr64->e_phensize * ehdr64->e_phnum > size) + if (ehdr64->e_phoff + ((uint32_t) ehdr64->e_phensize * ehdr64->e_phnum) > size) return -1; return 1; default: