readelf: Fix overlarge memory allocation when reading a binary with an excessive...
authorNick Clifton <nickc@redhat.com>
Mon, 3 Apr 2017 11:14:06 +0000 (12:14 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 3 Apr 2017 11:14:06 +0000 (12:14 +0100)
commit82156ab704b08b124d319c0decdbd48b3ca2dac5
tree942d5f78b2d3693e478cee3c603fb8332c4902b1
parent75ec1fdbb797a389e4fe4aaf2e15358a070dcc19
readelf: Fix overlarge memory allocation when reading a binary with an excessive number of program headers.

PR binutils/21345
* readelf.c (get_program_headers): Check for there being too many
program headers before attempting to allocate space for them.
binutils/ChangeLog
binutils/readelf.c