Till Wegmüller
2024-04-07 6ca8c2ef2bffdfec8cc95c049ac3f2230dc6ca82
commit | author | age
6ca8c2 1                READLINE PATCH REPORT
TW 2                =====================
3
4 Readline-Release: 8.2
5 Patch-ID: readline82-001
6
7 Bug-Reported-by:    Kan-Ru Chen <koster@debian.org>
8 Bug-Reference-ID:
9 Bug-Reference-URL:    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
10
11 Bug-Description:
12
13 Starting a readline application with an invalid locale specification for
14 LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline.
15
16 Patch (apply with `patch -p0'):
17
18 *** ../readline-8.2-patched/nls.c    2022-08-15 09:38:51.000000000 -0400
19 --- a/nls.c    2022-10-05 09:23:22.000000000 -0400
20 ***************
21 *** 142,145 ****
22 --- 142,149 ----
23       lspec = "";
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;
29   #else
30     ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
31
32 *** ../readline-8.2/patchlevel    2013-11-15 08:11:11.000000000 -0500
33 --- a/patchlevel    2014-03-21 08:28:40.000000000 -0400
34 ***************
35 *** 1,3 ****
36   # Do not edit -- exists only for use by patch
37   
38 ! 0
39 --- 1,3 ----
40   # Do not edit -- exists only for use by patch
41   
42 ! 1