bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash-5.2 official patch 2


From: Chet Ramey
Subject: Bash-5.2 official patch 2
Date: Wed, 5 Oct 2022 11:05:58 -0400

                             BASH PATCH REPORT
                             =================

Bash-Release:   5.2
Patch-ID:       bash52-002

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 bash with an invalid locale specification for LC_ALL/LANG/LC_CTYPE
can cause the shell to crash.

Patch (apply with `patch -p0'):

*** ../bash-5.2-patched/lib/readline/nls.c      2022-08-15 09:38:51.000000000 
-0400
--- lib/readline/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;

*** ../bash-5.2/patchlevel.h    2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h        2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 1
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 2
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]