asan: null dereference in read_and_display_attr_value
authorAlan Modra <amodra@gmail.com>
Tue, 10 Oct 2023 07:48:07 +0000 (18:18 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 10 Oct 2023 11:47:29 +0000 (22:17 +1030)
commitf22f27f46c756e753ab6dcc4df820fdd81e26367
tree096b8f037d6cd594a1854eacfb7e8ecbba4a182f
parent322b071c45d5e5ae14d247e8fa74a4cff58e1a8a
asan: null dereference in read_and_display_attr_value

This fixes multiple places in read_and_display_attr_value dealing with
range and location lists that can segfault when debug_info_p is NULL.
Fuzzed object files can contain arbitrary DW_FORMs.

* dwarf.c (read_and_display_attr_value): Don't dereference NULL
debug_info_p.
binutils/dwarf.c