More fixes for readelf problems reading corrupt files.
authorNick Clifton <nickc@redhat.com>
Thu, 13 Nov 2014 10:45:50 +0000 (10:45 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 13 Nov 2014 10:45:50 +0000 (10:45 +0000)
commit3102e897eeda28961a32826095befef5c4a74097
tree443057786ff6a438191a01b8ff8b9036cd0fc99e
parenta59add0c2ed21c03efc8b39e333564d7713a7ccc
More fixes for readelf problems reading corrupt files.

PR binutils/17531
* readelf.c (process_version_sections): If the read of the version
def information fails, make sure that the external verdef data is
not used.
(get_dynamic_data): Do not attempt to allocate memory for more
dynamic data than there is in the file.  If the read fails, free
the allocated buffer.
(process_symbol_table): Do not print dynamic information if we
were unable to read the dynamic symbol table.
(print_gnu_note): Do not print the note if the descsz is too
small.
binutils/ChangeLog
binutils/readelf.c