summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/sym.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/sym.c b/runtime/sym.c
index a2cdd0ff..fc9b2e80 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -150,7 +150,8 @@ static struct _stp_module *_stp_mod_sec_lookup(unsigned long addr,
if (user != NULL)
{
m = (struct _stp_module *)user;
- *sec = &m->sections[0]; // XXX check actual section and relocate
+ if (sec)
+ *sec = &m->sections[0]; // XXX check actual section and relocate
dbug_sym(1, "found section %s in module %s at 0x%lx\n",
m->sections[0].name, m->name, vm_start);
if (strcmp(".dynamic", m->sections[0].name) == 0)