diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2019-05-29 10:36:57 -0400 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2019-05-29 16:14:50 -0400 |
commit | 955b06fa576df1a6954263043ea3f3a5b9ad5940 (patch) | |
tree | 699963af53c6e152b5f3582c76fce0e53c25749b /gas/ChangeLog-2013 | |
parent | f49055a52f04f75b6560f304eb975128dd82ad68 (diff) | |
download | gdb-955b06fa576df1a6954263043ea3f3a5b9ad5940.zip gdb-955b06fa576df1a6954263043ea3f3a5b9ad5940.tar.gz gdb-955b06fa576df1a6954263043ea3f3a5b9ad5940.tar.bz2 |
Don't crash is dwarf_decode_macro_bytes's 'body' is NULL, even when '!is_define'
Ref.: https://bugzilla.redhat.com/show_bug.cgi?id=1715008
On commit 7bede82892a06e6c26989803e70f53697392dcf9 ("Don't crash if
dwarf_decode_macro_bytes's 'body' is NULL"), I was too strict when
checking if 'body' is NULL: the check only comprised the case when
'is_define' is true. However, the corruption of .debug_macro by
rpmbuild's "debugedit" also affects the case when 'is_define' is
false, i.e., when the macro is being undefined.
This commit improves the check and covers both cases now. This has
been tested on Fedora 30 with a problematic debuginfo, and I don't see
a segfault anymore.
OK to push?
gdb/ChangeLog:
2019-05-29 Sergio Durigan Junior <sergiodj@redhat.com>
Ref.: https://bugzilla.redhat.com/show_bug.cgi?id=1708192
Ref.: https://bugzilla.redhat.com/show_bug.cgi?id=1715008
* dwarf2read.c (dwarf_decode_macro_bytes): Move check to see if
'body' is NULL to the outter 'if', protecting the '!is_define'
situation as well.
Diffstat (limited to 'gas/ChangeLog-2013')
0 files changed, 0 insertions, 0 deletions