bug-bash
[Top][All Lists]
Advanced

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

Bash-5.2 official patch 5


From: Chet Ramey
Subject: Bash-5.2 official patch 5
Date: Tue, 8 Nov 2022 09:49:17 -0500

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

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

Bug-Reported-by:        Justin Wood (Callek) <callek@gmail.com>
Bug-Reference-ID:       
<CANBDKY9fp2yiXONP7RY4kNuRteuovUebxSJaqePHeu7cyaFS9Q@mail.gmail.com>
Bug-Reference-URL:      
https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00088.html

Bug-Description:

Null pattern substitution replacement strings can cause a crash.

Patch (apply with `patch -p0'):

*** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400
--- subst.c     2022-10-13 16:57:26.000000000 -0400
***************
*** 8966,8970 ****
      }
    else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
!     return ((mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : 
savestring (rep));
  
    ret = (char *)xmalloc (rsize = 64);
--- 8966,8971 ----
      }
    else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
!     return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2)
!                                  : (rep ? savestring (rep) : savestring (""));
  
    ret = (char *)xmalloc (rsize = 64);
*** ../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 4
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 5
  
  #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]