diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-04-08 09:06:09 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-04-08 09:41:02 -0700 |
commit | 1cce91d8aed5c3eca2b6f47767c82d9ed3e9e33f (patch) | |
tree | 06e6b3e61b4079b1821730d63fe1ae0a5d94db82 /elf/dl-catch.c | |
parent | 727aacfd667c026762b9aaa1a3a293f815edebba (diff) | |
download | glibc-1cce91d8aed5c3eca2b6f47767c82d9ed3e9e33f.zip glibc-1cce91d8aed5c3eca2b6f47767c82d9ed3e9e33f.tar.gz glibc-1cce91d8aed5c3eca2b6f47767c82d9ed3e9e33f.tar.bz2 |
elf: Check objname before calling fatal_error
_dl_signal_error may be called with objname == NULL. _dl_exception_create
checks objname == NULL. But fatal_error doesn't. Check objname before
calling fatal_error. This fixes BZ #31596.
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
Diffstat (limited to 'elf/dl-catch.c')
-rw-r--r-- | elf/dl-catch.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/elf/dl-catch.c b/elf/dl-catch.c index 2109516..8ef7a4c 100644 --- a/elf/dl-catch.c +++ b/elf/dl-catch.c @@ -126,7 +126,11 @@ _dl_signal_error (int errcode, const char *objname, const char *occasion, __longjmp (lcatch->env[0].__jmpbuf, 1); } else - fatal_error (errcode, objname, occasion, errstring); + { + if (objname == NULL) + objname = ""; + fatal_error (errcode, objname, occasion, errstring); + } } rtld_hidden_def (_dl_signal_error) |