Blame SOURCES/bash42-032

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