More fixes for processing corrupt files.
authorNick Clifton <nickc@redhat.com>
Wed, 5 Nov 2014 10:13:16 +0000 (10:13 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 5 Nov 2014 10:13:16 +0000 (10:13 +0000)
commit20ad5e2842911039a60b6bdf9880cee895179e43
tree60c1883ca19d125970f9d60ad04cb32cced0ffcc
parent1ae1b8cc656639e18715829cbcd72916e86f3324
More fixes for processing corrupt files.

PR binutils/17512
* coffcode.h (coff_set_alignment_hook): Warn if the file lies
about the number of relocations it contains.
(coff_sort_func_alent): Return 0 if the pointers are NULL.
(coff_slurp_line_table): Add more range checks.  Do not free new
tables created when sorting line numbers.
* peXXigen.c (pe_print_idata): Add range checks.
(pe_print_edata): Likewise.
(rsrc_print_resource_entries): Likewise.  Avoid printing control
characters.  Terminate priniting if corruption is detected.
(rsrc_print_resource_directory): Terminate printing if an unknown
directory type is encountered.
(pe_print_debugdata): Fix off-by-one error.
(rsrc_count_entries): Add range checking.
(rsrc_parse_entry): Likewise.
bfd/ChangeLog
bfd/coffcode.h
bfd/peXXigen.c