mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
(dl_open_worker): Avoid dereferencing map in statically linked code if there might none be found.
This commit is contained in:
@ -207,8 +207,16 @@ dl_open_worker (void *a)
|
|||||||
|
|
||||||
found_caller:
|
found_caller:
|
||||||
if (args->nsid == __LM_ID_CALLER)
|
if (args->nsid == __LM_ID_CALLER)
|
||||||
|
{
|
||||||
|
#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;
|
args->nsid = call_map->l_ns;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Maybe we have to expand a DST. */
|
/* Maybe we have to expand a DST. */
|
||||||
if (__builtin_expect (dst != NULL, 0))
|
if (__builtin_expect (dst != NULL, 0))
|
||||||
|
Reference in New Issue
Block a user