From: Petr Machata Date: Tue, 10 Feb 2009 17:37:04 +0000 (+0100) Subject: Fix SEGV on absence of relocation data X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e20397ba4669f2d64cdd1f7a002430983bed8852;p=thirdparty%2Felfutils.git Fix SEGV on absence of relocation data --- diff --git a/src/dwarflint.c b/src/dwarflint.c index 9020514be..07a54c3da 100644 --- a/src/dwarflint.c +++ b/src/dwarflint.c @@ -2797,7 +2797,8 @@ check_cu_structural (struct read_ctx *ctx, if (read_die_chain (ctx, cu, abbrevs, strings, dwarf_64, address_size == 8, die_refs, &die_loc_refs, strings_coverage, - reloc->data != NULL ? reloc : NULL, ebl) >= 0) + (reloc != NULL && reloc->data != NULL) ? reloc : NULL, + ebl) >= 0) { for (size_t i = 0; i < abbrevs->size; ++i) if (!abbrevs->abbr[i].used)