diff --git a/readline.changes b/readline.changes index 275174a..d81bb50 100644 --- a/readline.changes +++ b/readline.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Oct 6 11:27:00 UTC 2022 - Dr. Werner Fink + +- Add patch readline82-001 and its signing readline82-001 + * Starting a readline application with an invalid localee + specification for LC_ALL/LANG/LC_CTYPE can cause it crash on + the first call to readline. + ------------------------------------------------------------------- Tue Sep 27 07:25:51 UTC 2022 - Dr. Werner Fink diff --git a/readline.spec b/readline.spec index c6c3593..b9db501 100644 --- a/readline.spec +++ b/readline.spec @@ -33,6 +33,8 @@ Source2: baselibs.conf Source4: https://tiswww.case.edu/php/chet/gpgkey.asc#/%{name}.keyring # signatures for official patches # official patches +Patch101: readline82-001 +Source101: readline82-001.sig # local patches Patch200: readline-%{version}.dif Patch201: readline-6.3-input.dif @@ -103,6 +105,7 @@ as well as programming with the interface of the readline library. %prep %setup -q -n readline-%{version}%{rextend} # official patches +%patch101 -p0 # local patches %patch201 -p2 -b .zerotty %patch202 -p2 -b .conf diff --git a/readline82-001 b/readline82-001 new file mode 100644 index 0000000..0f684af --- /dev/null +++ b/readline82-001 @@ -0,0 +1,42 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-001 + +Bug-Reported-by: Kan-Ru Chen +Bug-Reference-ID: +Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109 + +Bug-Description: + +Starting a readline application with an invalid locale specification for +LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline. + +Patch (apply with `patch -p0'): + +*** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400 +--- nls.c 2022-10-05 09:23:22.000000000 -0400 +*************** +*** 142,145 **** +--- 142,149 ---- + lspec = ""; + ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */ ++ if (ret == 0 || *ret == 0) ++ ret = setlocale (LC_CTYPE, (char *)NULL); ++ if (ret == 0 || *ret == 0) ++ ret = RL_DEFAULT_LOCALE; + #else + ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec; + +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 0 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 1 diff --git a/readline82-001.sig b/readline82-001.sig new file mode 100644 index 0000000..2977545 Binary files /dev/null and b/readline82-001.sig differ