diff options
| author | Corinna Vinschen <corinna@vinschen.de> | 2026-04-24 12:46:08 +0200 |
|---|---|---|
| committer | Corinna Vinschen <corinna@vinschen.de> | 2026-04-24 12:46:08 +0200 |
| commit | 4ba7eff4d15af0f749d1913703a25c045d40fa90 (patch) | |
| tree | 2b20f73c98c719f63a2379c291569a00667302a6 /libgloss/crx/kill.c | |
| parent | 8f1d2b499bc9e8007321090c1859e55c7ce7d417 (diff) | |
| download | newlib-main.tar.gz newlib-main.tar.bz2 newlib-main.zip | |
jp2uc/up2jc: avoid crash due to invalid pointerHEADgithub/mastergithub/mainmastermain
Commit 4356ccd02c9c ("towupper/towlower: handle Turkic language special
casing") changed the locale pointer in calls to towctrans_l from a NULL
pointer to LC_GLOBAL_LOCALE, which is defined as -1.
Unfortunately jp2uc_l/up2jc_l just expect a NULL or non-NULL pointer,
so LC_GLOBAL_LOCALE as input is derefenced later on and the call crashes.
To fix this problem, handle LC_GLOBAL_LOCALE just as if a NULL pointer
has been passed to the function. Keep the NULL pointer handling intact
for backward compatibility.
Fixes: 4356ccd02c9c ("towupper/towlower: handle Turkic language special casing")
Reported-by: Christophe Lyon <christophe.lyon.oss@gmail.com>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'libgloss/crx/kill.c')
0 files changed, 0 insertions, 0 deletions
