Fix seg-faults when running readelf on fuzzed binaries.
authorNick Clifton <nickc@redhat.com>
Mon, 8 Aug 2016 12:20:04 +0000 (13:20 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 8 Aug 2016 12:20:04 +0000 (13:20 +0100)
commitd8024a9189b9e686e403512a96e4256823b5c6e4
tree0b858324d0bded058516cc8557c9bdf027173bdd
parent8a286b63457628b0a55d395f14005f254512e27d
Fix seg-faults when running readelf on fuzzed binaries.

PR binutils/20440
* dwarf.c (display_debug_lines_decoded): Add checks for running
off the end of the section when populating the directory table and
file table.
(frame_display_row): Set max_regs equal to ncols.
(load_specific_debug_section): If the section is compressed, but
it is not big enough to hold a compression header then warn and
return 0.
binutils/ChangeLog
binutils/dwarf.c
binutils/readelf.c