aboutsummaryrefslogtreecommitdiff
path: root/elf/dynamic-link.h
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dynamic-link.h')
-rw-r--r--elf/dynamic-link.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index a7316eefe8..84d440ec5b 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -32,6 +32,9 @@ elf_get_dynamic_info (Elf32_Dyn *dyn, Elf32_Dyn *info[DT_NUM])
for (i = 0; i < DT_NUM; ++i)
info[i] = NULL;
+ if (! dyn)
+ return;
+
while (dyn->d_tag != DT_NULL)
{
assert (dyn->d_tag < DT_NUM);