]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Fix a SEGV
authorPetr Machata <pmachata@redhat.com>
Thu, 16 Apr 2009 15:51:58 +0000 (17:51 +0200)
committerPetr Machata <pmachata@redhat.com>
Tue, 21 Apr 2009 12:47:39 +0000 (14:47 +0200)
src/dwarflint.c

index 9e197db778d0ec3da1b93b691f9f80f615ab24fb..c24e6a523b8d899d4f15f66dea3276f76afbe8dc 100644 (file)
@@ -3204,8 +3204,10 @@ read_die_chain (struct read_ctx *ctx,
                  {
                    relocate_one (reloc, rel, addr_64 ? 8 : 4, &addr, &where,
                                  reloc_target (form, it), symbolp);
-                   *relocatedp = true;
-                   *addrp = addr;
+                   if (relocatedp != NULL)
+                     *relocatedp = true;
+                   if (addrp != NULL)
+                     *addrp = addr;
                  }
                else if (type_is_rel && addr != 0)
                  /* In non-rel files, neither addr, nor ref_addr