1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Avoid crashing in LD_DEBUG when program name is unavailable

Resolves: #15465

The program name may be unavailable if the user application tampers
with argc and argv[].  Some parts of the dynamic linker caters for
this while others don't, so this patch consolidates the check and
fallback into a single macro and updates all users.
This commit is contained in:
Siddhesh Poyarekar
2013-05-29 21:30:20 +05:30
parent d0501bfbe2
commit b937534868
41 changed files with 220 additions and 103 deletions

View File

@@ -310,8 +310,7 @@ _dl_map_object_deps (struct link_map *map,
_dl_debug_printf ("load auxiliary object=%s"
" requested by file=%s\n",
name,
l->l_name[0]
? l->l_name : rtld_progname);
DSO_FILENAME (l->l_name));
/* We must be prepared that the addressed shared
object is not available. */
@@ -337,8 +336,7 @@ _dl_map_object_deps (struct link_map *map,
_dl_debug_printf ("load filtered object=%s"
" requested by file=%s\n",
name,
l->l_name[0]
? l->l_name : rtld_progname);
DSO_FILENAME (l->l_name));
/* For filter objects the dependency must be available. */
bool malloced;