readelf: fix out of range subtraction, seg fault from a NULL pointer and memory exhau...
authorNick Clifton <nickc@redhat.com>
Thu, 13 Apr 2017 15:06:30 +0000 (16:06 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 13 Apr 2017 15:06:30 +0000 (16:06 +0100)
commit7296a62a2a237f6b1ad8db8c38b090e9f592c8cf
treec5ea4ca4f74236e794f4b99f261de2fc46f935b2
parent1d15e434f43bc41a07bc7b0648fcb7e6ccbe8dcc
readelf: fix out of range subtraction, seg fault from a NULL pointer and memory exhaustion, all from parsing corrupt binaries.

PR binutils/21379
* readelf.c (process_dynamic_section): Detect over large section
offsets in the DT_SYMTAB entry.

PR binutils/21345
* readelf.c (process_mips_specific): Catch an unfeasible memory
allocation before it happens and print a suitable error message.
binutils/ChangeLog
binutils/readelf.c