mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +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:
@ -119,7 +119,7 @@ _dl_signal_error (int errcode, const char *objname, const char *occation,
|
||||
/* Lossage while resolving the program's own symbols is always fatal. */
|
||||
char buffer[1024];
|
||||
_dl_fatal_printf ("%s: %s: %s%s%s%s%s\n",
|
||||
rtld_progname ?: "<program name unknown>",
|
||||
RTLD_PROGNAME,
|
||||
occation ?: N_("error while loading shared libraries"),
|
||||
objname, *objname ? ": " : "",
|
||||
errstring, errcode ? ": " : "",
|
||||
|
Reference in New Issue
Block a user