]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix SEGV on absence of relocation data
authorPetr Machata <pmachata@redhat.com>
Tue, 10 Feb 2009 17:37:04 +0000 (18:37 +0100)
committerPetr Machata <pmachata@redhat.com>
Tue, 10 Feb 2009 17:37:04 +0000 (18:37 +0100)
src/dwarflint.c

index 9020514beab2220961be19e754ad584ac2fcf0b9..07a54c3dae358ccc5ec357267972a73b6cd80c3d 100644 (file)
@@ -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)