SHA256
1
0
forked from pool/readline

Add readline82-001 patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/readline?expand=0&rev=32
This commit is contained in:
Dr. Werner Fink 2022-10-06 12:12:52 +00:00 committed by Git OBS Bridge
parent 97fb639739
commit 0cf7afcf20
4 changed files with 53 additions and 0 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Oct 6 11:27:00 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- 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 <werner@suse.de>

View File

@ -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

42
readline82-001 Normal file
View File

@ -0,0 +1,42 @@
READLINE PATCH REPORT
=====================
Readline-Release: 8.2
Patch-ID: readline82-001
Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
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

BIN
readline82-001.sig Normal file

Binary file not shown.