rcolebaugh / rpms / bash

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