alicelinux

A lightweight musl + clang/llvm + libressl + busybox distro
git clone https://codeberg.org/emmett1/alicelinux
Log | Files | Refs | README | LICENSE

readline-8.2-upstream_fix-1.patch (1254B)


      1 Submitted By:                Bruce Dubbs <bdubbs@linuxfromscratch.org>
      2 Date:                        2021-10-12
      3 Initial Package Version:     8.2
      4 Upstream Status:             Applied
      5 Origin:                      Upstream release repository
      6                              Starting a readline applications  with an invalid locale 
      7                              specification for LC_ALL/LANG/LC_CTYPE can cause the shell 
      8                              to crash.
      9 
     10 diff -Naur readline-8.2-orig/nls.c readline-8.2/nls.c
     11 --- readline-8.2-orig/nls.c	2022-08-15 08:38:51.000000000 -0500
     12 +++ readline-8.2/nls.c	2022-10-12 19:51:35.881738300 -0500
     13 @@ -141,6 +141,10 @@
     14    if (lspec == 0)
     15      lspec = "";
     16    ret = setlocale (LC_CTYPE, lspec);	/* ok, since it does not change locale */
     17 +  if (ret == 0 || *ret == 0)
     18 +    ret = setlocale (LC_CTYPE, (char *)NULL);
     19 +  if (ret == 0 || *ret == 0)
     20 +    ret = RL_DEFAULT_LOCALE;
     21  #else
     22    ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
     23  #endif
     24 diff -Naur readline-8.2-orig/patchlevel readline-8.2/patchlevel
     25 --- readline-8.2-orig/patchlevel	2020-05-21 13:22:40.000000000 -0500
     26 +++ readline-8.2/patchlevel	2022-10-12 19:51:35.881738300 -0500
     27 @@ -1,3 +1,3 @@
     28  # Do not edit -- exists only for use by patch
     29  
     30 -0
     31 +1