diff options
author | Alan Modra <amodra@gmail.com> | 2017-10-06 14:14:21 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-10-06 16:13:08 +1030 |
commit | e98fdf1ab07243fe467caadd0d033b44b8ca20c7 (patch) | |
tree | a40ab6ad74dbc14a505320c59e66182e5612d513 /bfd/elf64-x86-64.c | |
parent | 0caf6c82ab23ece570d14499ed02653968cd8abd (diff) | |
download | gdb-e98fdf1ab07243fe467caadd0d033b44b8ca20c7.zip gdb-e98fdf1ab07243fe467caadd0d033b44b8ca20c7.tar.gz gdb-e98fdf1ab07243fe467caadd0d033b44b8ca20c7.tar.bz2 |
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/elf64-x86-64.c')
0 files changed, 0 insertions, 0 deletions