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