summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/readline/readline/readline82-001.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/readline/readline/readline82-001.patch')
-rw-r--r--meta/recipes-core/readline/readline/readline82-001.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-core/readline/readline/readline82-001.patch b/meta/recipes-core/readline/readline/readline82-001.patch
new file mode 100644
index 0000000000..4e9839db9c
--- /dev/null
+++ b/meta/recipes-core/readline/readline/readline82-001.patch
@@ -0,0 +1,45 @@
1 READLINE PATCH REPORT
2 =====================
3
4Readline-Release: 8.2
5Patch-ID: readline82-001
6
7Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
8Bug-Reference-ID:
9Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
10
11Bug-Description:
12
13Starting a readline application with an invalid locale specification for
14LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline.
15
16Patch (apply with `patch -p0'):
17
18Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/]
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20
21*** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400
22--- nls.c 2022-10-05 09:23:22.000000000 -0400
23***************
24*** 142,145 ****
25--- 142,149 ----
26 lspec = "";
27 ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
28+ if (ret == 0 || *ret == 0)
29+ ret = setlocale (LC_CTYPE, (char *)NULL);
30+ if (ret == 0 || *ret == 0)
31+ ret = RL_DEFAULT_LOCALE;
32 #else
33 ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
34
35*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
36--- patchlevel 2014-03-21 08:28:40.000000000 -0400
37***************
38*** 1,3 ****
39 # Do not edit -- exists only for use by patch
40
41! 0
42--- 1,3 ----
43 # Do not edit -- exists only for use by patch
44
45! 1