From: Petr Machata Date: Wed, 15 Jul 2009 14:29:08 +0000 (+0200) Subject: dwarflint: Fix SEGV X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b614fa118f730a781c9df2cd6d435fbc8f7cfda;p=thirdparty%2Felfutils.git dwarflint: Fix SEGV --- diff --git a/src/dwarflint.c b/src/dwarflint.c index c7fb6e83a..693830073 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -3279,13 +3279,18 @@ read_die_chain (struct read_ctx *ctx, if (relocatedp != NULL) *relocatedp = true; } - else if (type_is_rel && addr != 0) - /* In non-rel files, neither addr, nor ref_addr - /need/ a relocation. We at least check that - ref_addr points to sensible datum by recording - the reference below. */ - wr_message (mc_impact_2 | mc_die_rel | mc_reloc, &where, - PRI_LACK_RELOCATION, dwarf_form_string (form)); + else + { + if (symbolp != NULL) + WIPE (*symbolp); + if (type_is_rel && addr != 0) + /* In non-rel files, neither addr, nor ref_addr + /need/ a relocation. We at least check that + ref_addr points to sensible datum by recording + the reference below. */ + wr_message (mc_impact_2 | mc_die_rel | mc_reloc, &where, + PRI_LACK_RELOCATION, dwarf_form_string (form)); + } if (addrp != NULL) *addrp = addr;