summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2009-04-16 17:51:58 +0200
committerPetr Machata <pmachata@redhat.com>2009-04-21 14:47:39 +0200
commit80b8f077c705fe49bfa6d9cb65b57c00f71fa309 (patch)
treed19a36c7e9cce1718f168dfc06fbe7dbc0215d4c
parenta91723bcf21c20e957e31fc245700aaf4d6fb33f (diff)
downloadelfutils-80b8f077c705fe49bfa6d9cb65b57c00f71fa309.tar.gz
dwarflint: Fix a SEGV
-rw-r--r--src/dwarflint.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dwarflint.c b/src/dwarflint.c
index 9e197db7..c24e6a52 100644
--- a/src/dwarflint.c
+++ b/src/dwarflint.c
@@ -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