rcolebaugh / rpms / bash

Forked from rpms/bash 2 years ago
Clone
07a490
			     BASH PATCH REPORT
07a490
			     =================
07a490
07a490
Bash-Release:	4.2
07a490
Patch-ID:	bash42-046
07a490
07a490
Bug-Reported-by:	"Theodoros V. Kalamatianos" <thkala@gmail.com>
07a490
Bug-Reference-ID:	<20140112011131.GE17667@infinity.metashade.com>
07a490
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-01/msg00044.html
07a490
07a490
Bug-Description:
07a490
07a490
Bash-4.2 patch 32 introduced a problem with "$@" and arrays expanding empty
07a490
positional parameters or array elements when using substring expansion,
07a490
pattern substitution, or case modfication.  The empty parameters or array
07a490
elements are removed instead of expanding to empty strings ("").
07a490
07a490
Patch (apply with `patch -p0'):
07a490
07a490
*** ../bash-4.2-patched/subst.c	2012-12-31 11:52:56.000000000 -0500
07a490
--- subst.c	2014-03-31 14:19:56.000000000 -0400
07a490
***************
07a490
*** 7243,7247 ****
07a490
        ret = alloc_word_desc ();
07a490
        ret->word = temp1;
07a490
!       if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
07a490
  	ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
07a490
        return ret;
07a490
--- 7243,7253 ----
07a490
        ret = alloc_word_desc ();
07a490
        ret->word = temp1;
07a490
!       /* We test quoted_dollar_atp because we want variants with double-quoted
07a490
! 	 "$@" to take a different code path. In fact, we make sure at the end
07a490
! 	 of expand_word_internal that we're only looking at these flags if
07a490
! 	 quoted_dollar_at == 0. */
07a490
!       if (temp1 && 
07a490
!           (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) &&
07a490
! 	  QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
07a490
  	ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
07a490
        return ret;
07a490
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
07a490
--- patchlevel.h	Thu Feb 24 21:41:34 2011
07a490
***************
07a490
*** 26,30 ****
07a490
     looks for to find the patch level (for the sccs version string). */
07a490
  
07a490
! #define PATCHLEVEL 45
07a490
  
07a490
  #endif /* _PATCHLEVEL_H_ */
07a490
--- 26,30 ----
07a490
     looks for to find the patch level (for the sccs version string). */
07a490
  
07a490
! #define PATCHLEVEL 46
07a490
  
07a490
  #endif /* _PATCHLEVEL_H_ */