File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -397,13 +397,13 @@ ElfFile<ElfFileParamNames>::ElfFile(FileContents fileContents)
397397 if (rdi (hdr->e_type ) != ET_EXEC && rdi (hdr->e_type ) != ET_DYN)
398398 error (" wrong ELF type" );
399399
400- if (size_t ( rdi (hdr->e_phoff ) + rdi (hdr->e_phnum )) * rdi (hdr->e_phentsize ) > fileContents->size ())
400+ if (rdi (hdr->e_phoff ) + size_t ( rdi (hdr->e_phnum ) * rdi (hdr->e_phentsize ) ) > fileContents->size ())
401401 error (" program header table out of bounds" );
402402
403403 if (rdi (hdr->e_shnum ) == 0 )
404404 error (" no section headers. The input file is probably a statically linked, self-decompressing binary" );
405405
406- if (size_t ( rdi (hdr->e_shoff ) + rdi (hdr->e_shnum )) * rdi (hdr->e_shentsize ) > fileContents->size ())
406+ if (rdi (hdr->e_shoff ) + size_t ( rdi (hdr->e_shnum ) * rdi (hdr->e_shentsize ) ) > fileContents->size ())
407407 error (" section header table out of bounds" );
408408
409409 if (rdi (hdr->e_phentsize ) != sizeof (Elf_Phdr))
You can’t perform that action at this time.
0 commit comments