diff options
author | Alan Modra <amodra@gmail.com> | 2021-12-10 08:27:58 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-12-10 08:33:12 +1030 |
commit | b243230f64fb4db9a16ef88ec5bd3e3f48f1fe41 (patch) | |
tree | 6650222627bb5c7e8d2811b2235d0aafdb4898af /bfd/dwarf2.c | |
parent | b6d1f70cc7e948de99f91fc44d07c44686275fc4 (diff) | |
download | gdb-b243230f64fb4db9a16ef88ec5bd3e3f48f1fe41.zip gdb-b243230f64fb4db9a16ef88ec5bd3e3f48f1fe41.tar.gz gdb-b243230f64fb4db9a16ef88ec5bd3e3f48f1fe41.tar.bz2 |
PR28674, objdump crash
Not returning an error indication here leaves the attribute
uninitialised, which then leads to intemperate behaviour.
PR 28674
* dwarf2.c (read_attribute_value): Return NULL on trying to read
past end of attributes.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r-- | bfd/dwarf2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index 04f56a7..1c69b3d 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -1199,7 +1199,7 @@ read_attribute_value (struct attribute * attr, { _bfd_error_handler (_("DWARF error: info pointer extends beyond end of attributes")); bfd_set_error (bfd_error_bad_value); - return info_ptr; + return NULL; } attr->form = (enum dwarf_form) form; |