7 Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
9 Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
13 Starting bash with an invalid locale specification for LC_ALL/LANG/LC_CTYPE
14 can cause the shell to crash.
16 Patch (apply with `patch -p0'):
18 *** ../bash-5.2-patched/lib/readline/nls.c 2022-08-15 09:38:51.000000000 -0400
19 --- lib/readline/nls.c 2022-10-05 09:23:22.000000000 -0400
24 ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
25 + if (ret == 0 || *ret == 0)
26 + ret = setlocale (LC_CTYPE, (char *)NULL);
27 + if (ret == 0 || *ret == 0)
28 + ret = RL_DEFAULT_LOCALE;
30 ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
32 *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
33 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
36 looks for to find the patch level (for the sccs version string). */
38 ! #define PATCHLEVEL 1
40 #endif /* _PATCHLEVEL_H_ */
42 looks for to find the patch level (for the sccs version string). */
44 ! #define PATCHLEVEL 2
46 #endif /* _PATCHLEVEL_H_ */