nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash42-028

462fb2
			     BASH PATCH REPORT
462fb2
			     =================
462fb2
462fb2
Bash-Release:	4.2
462fb2
Patch-ID:	bash42-028
462fb2
462fb2
Bug-Reported-by:	Mark Edgar <medgar123@gmail.com>
462fb2
Bug-Reference-ID:	<CABHMh_3d+ZgO_zaEtYXPwK4P7tC0ghZ4g=Ue_TRpsEMf5YDsqw@mail.gmail.com>
462fb2
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00109.html
462fb2
462fb2
Bug-Description:
462fb2
462fb2
When using a word expansion for which the right hand side is evaluated,
462fb2
certain expansions of quoted null strings include spurious ^? characters.
462fb2
462fb2
Patch (apply with `patch -p0'):
462fb2
462fb2
*** ../bash-4.2-patched/subst.c	2012-03-11 17:35:13.000000000 -0400
462fb2
--- subst.c	2012-03-20 19:30:13.000000000 -0400
462fb2
***************
462fb2
*** 5810,5813 ****
462fb2
--- 5810,5823 ----
462fb2
        if (qdollaratp && ((hasdol && quoted) || l->next))
462fb2
  	*qdollaratp = 1;
462fb2
+       /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is
462fb2
+ 	 a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the
462fb2
+ 	 flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the
462fb2
+ 	 expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
462fb2
+ 	 (which is more paranoia than anything else), we need to return the
462fb2
+ 	 quoted null string and set the flags to indicate it. */
462fb2
+       if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL(temp) && QUOTED_NULL(l->word->word) && (l->word->flags & W_HASQUOTEDNULL))
462fb2
+ 	{
462fb2
+ 	  w->flags |= W_HASQUOTEDNULL;
462fb2
+ 	}
462fb2
        dispose_words (l);
462fb2
      }
462fb2
462fb2
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
462fb2
--- patchlevel.h	Thu Feb 24 21:41:34 2011
462fb2
***************
462fb2
*** 26,30 ****
462fb2
     looks for to find the patch level (for the sccs version string). */
462fb2
  
462fb2
! #define PATCHLEVEL 27
462fb2
  
462fb2
  #endif /* _PATCHLEVEL_H_ */
462fb2
--- 26,30 ----
462fb2
     looks for to find the patch level (for the sccs version string). */
462fb2
  
462fb2
! #define PATCHLEVEL 28
462fb2
  
462fb2
  #endif /* _PATCHLEVEL_H_ */