summaryrefslogtreecommitdiff
path: root/bfd/elfxx-x86.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-10-06 14:14:21 +1030
committerAlan Modra <amodra@gmail.com>2017-10-06 16:13:08 +1030
commite98fdf1ab07243fe467caadd0d033b44b8ca20c7 (patch)
treea40ab6ad74dbc14a505320c59e66182e5612d513 /bfd/elfxx-x86.h
parent0caf6c82ab23ece570d14499ed02653968cd8abd (diff)
downloadbinutils-gdb-e98fdf1ab07243fe467caadd0d033b44b8ca20c7.tar.gz
DWARF header checks
This patch tidies DWARF header checks, consolidating the "negative" checks (which are really overflow checks) with the section size check. In a number of cases this also ensures that small negative lengths are caught. For instance hdrptr = start + arange.ar_length + initial_length_size; if (hdrptr < start || hdrptr > end) does not detect ar_length in the range [-initial_length_size,-1]. * dwarf.c (process_debug_info): Consolidate header length checks. (display_debug_pubnames_worker): Use "start" to read header. Properly check header length and report errors earlier. Simplify loop printing pubnames. (get_line_filename_and_dirname): Catch small negative "length" values. (display_debug_aranges): Likewise. Report header errors earlier using standardized message. (display_debug_names): Likewise.
Diffstat (limited to 'bfd/elfxx-x86.h')
0 files changed, 0 insertions, 0 deletions