Skip to content

Commit

Permalink
(dl_open_worker): Avoid dereferencing map in statically linked code i…
Browse files Browse the repository at this point in the history
…f there might none be found.
  • Loading branch information
Ulrich Drepper committed Oct 18, 2004
1 parent 36106aa commit 71fa9df
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion elf/dl-open.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,15 @@ dl_open_worker (void *a)

found_caller:
if (args->nsid == __LM_ID_CALLER)
args->nsid = call_map->l_ns;
{
#ifndef SHARED
/* In statically linked apps there might be no loaded object. */
if (call_map == NULL)
args->nsid = LM_ID_BASE;
else
#endif
args->nsid = call_map->l_ns;
}
}

/* Maybe we have to expand a DST. */
Expand Down

0 comments on commit 71fa9df

Please sign in to comment.