Fixes an infinite loop in readelf parsing a corrupt binary, and other minor corrections.
authorEspen Grindhaug <espen@grindhaug.org>
Thu, 27 Nov 2014 15:49:23 +0000 (15:49 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 27 Nov 2014 15:49:23 +0000 (15:49 +0000)
commitc9c1d674406c5fff9d2f2ea771e4288cb6bf4e5a
tree180e70155d8ea5c69ab70bc7c20fdde1436bd416
parent3a1cfc456f3b3f422b7c6c0d63891b015ea234b9
Fixes an infinite loop in readelf parsing a corrupt binary, and other minor corrections.

PR binutils/17531
* readelf.c (get_data): Move excessive length check to earlier on
in the function and allow for wraparound in the arithmetic.
(get_32bit_elf_symbols): Terminate early if the section size is
zero.  Check for an invalid sh_entsize.  Check for an index
section with an invalid size.
(get_64bit_elf_symbols): Likewise.
(process_section_groups): Check for an invalid sh_entsize.
binutils/ChangeLog
binutils/readelf.c
This page took 0.026632 seconds and 4 git commands to generate.