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