PR29171, invalid read causing SIGSEGV
authorAlan Modra <amodra@gmail.com>
Tue, 24 May 2022 01:17:35 +0000 (10:47 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 24 May 2022 02:35:39 +0000 (12:05 +0930)
commitbe38442ddacf1fd25c8868d0491ea9e98b0e9ca7
treedc3cbbe07971ea3269eedaae5aef5ea1150d3300
parent5fbb38fcc5b2157729407f182287b93531066890
PR29171, invalid read causing SIGSEGV

The fix here is to pass "section" down to read_and_display_attr_value.
The test in read_and_display_attr_value is a little bit of hardening.

PR 29171
* dwarf.c (display_debug_macro, display_debug_names): Pass section
to read_and_display_attr_value2.
(read_and_display_attr_value): Don't attempt to check for .dwo
section name when section is NULL.
binutils/dwarf.c