rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone
07a490
			     BASH PATCH REPORT
07a490
			     =================
07a490
07a490
Bash-Release:	4.2
07a490
Patch-ID:	bash42-032
07a490
07a490
Bug-Reported-by:	Ruediger Kuhlmann <RKuhlmann@orga-systems.com>
07a490
Bug-Reference-ID:	<OFDE975207.0C3622E5-ONC12579F3.00361A06-C12579F3.00365E39@orga-systems.com>
07a490
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00010.html
07a490
07a490
Bug-Description:
07a490
07a490
Bash-4.2 has problems with DEL characters in the expanded value of variables
07a490
used in the same quoted string as variables that expand to nothing.
07a490
07a490
Patch (apply with `patch -p0'):
07a490
07a490
*** ../bash-20120427/subst.c	2012-04-22 16:19:10.000000000 -0400
07a490
--- subst.c	2012-05-07 16:06:35.000000000 -0400
07a490
***************
07a490
*** 8152,8155 ****
07a490
--- 8152,8163 ----
07a490
  	  dispose_word_desc (tword);
07a490
  
07a490
+ 	  /* Kill quoted nulls; we will add them back at the end of
07a490
+ 	     expand_word_internal if nothing else in the string */
07a490
+ 	  if (had_quoted_null && temp && QUOTED_NULL (temp))
07a490
+ 	    {
07a490
+ 	      FREE (temp);
07a490
+ 	      temp = (char *)NULL;
07a490
+ 	    }
07a490
+ 
07a490
  	  goto add_string;
07a490
  	  break;
07a490
***************
07a490
*** 8556,8560 ****
07a490
        if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
07a490
  	tword->flags |= W_QUOTED;
07a490
!       if (had_quoted_null)
07a490
  	tword->flags |= W_HASQUOTEDNULL;
07a490
        list = make_word_list (tword, (WORD_LIST *)NULL);
07a490
--- 8564,8568 ----
07a490
        if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
07a490
  	tword->flags |= W_QUOTED;
07a490
!       if (had_quoted_null && QUOTED_NULL (istring))
07a490
  	tword->flags |= W_HASQUOTEDNULL;
07a490
        list = make_word_list (tword, (WORD_LIST *)NULL);
07a490
***************
07a490
*** 8587,8591 ****
07a490
  	  if (word->flags & W_NOEXPAND)
07a490
  	    tword->flags |= W_NOEXPAND;
07a490
! 	  if (had_quoted_null)
07a490
  	    tword->flags |= W_HASQUOTEDNULL;	/* XXX */
07a490
  	  list = make_word_list (tword, (WORD_LIST *)NULL);
07a490
--- 8595,8599 ----
07a490
  	  if (word->flags & W_NOEXPAND)
07a490
  	    tword->flags |= W_NOEXPAND;
07a490
! 	  if (had_quoted_null && QUOTED_NULL (istring))
07a490
  	    tword->flags |= W_HASQUOTEDNULL;	/* XXX */
07a490
  	  list = make_word_list (tword, (WORD_LIST *)NULL);
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 31
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 32
07a490
  
07a490
  #endif /* _PATCHLEVEL_H_ */