diff options
author | Alan Modra <amodra@gmail.com> | 2019-11-30 09:12:29 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-03 16:05:40 +1030 |
commit | 019cc8758a68d016db920f96de3273a2824929d1 (patch) | |
tree | 0936437a5a17c7aea43823eb52fcb646de79e1b8 /bfd/ChangeLog | |
parent | 1b8e12713b399450f8befc5f52442219f1f63669 (diff) | |
download | gdb-019cc8758a68d016db920f96de3273a2824929d1.zip gdb-019cc8758a68d016db920f96de3273a2824929d1.tar.gz gdb-019cc8758a68d016db920f96de3273a2824929d1.tar.bz2 |
dwarf2.c: read_abbrevs fail cleanup, and offset checking
read_section does offset checking, reporting an error on out of
bounds. There's no need to duplicate the check in functions calling
read_section. Also, I spotted a place where a pointer difference
expression was being cast to unsigned int, possibly truncating
relevant bits on a 64-bit host.
* dwarf2.c (read_indirect_string): Don't duplicate offset check
done in read_section.
(read_indirect_line_string): Likewise.
(read_alt_indirect_string): Likewise.
(read_alt_indirect_ref): Likewise.
(read_abbrevs): Likewise. Free memory on all failure paths.
Use correct unsigned type for pointer difference comparison.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7765703..f299ff1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,15 @@ 2019-12-03 Alan Modra <amodra@gmail.com> + * dwarf2.c (read_indirect_string): Don't duplicate offset check + done in read_section. + (read_indirect_line_string): Likewise. + (read_alt_indirect_string): Likewise. + (read_alt_indirect_ref): Likewise. + (read_abbrevs): Likewise. Free memory on all failure paths. + Use correct unsigned type for pointer difference comparison. + +2019-12-03 Alan Modra <amodra@gmail.com> + * dwarf2.c (struct dwarf2_debug): Update comments. Remove sec and sec_info_ptr. (_bfd_dwarf2_slurp_debug_info): Don't set sec or sec_info_ptr. |