nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash42-004

462fb2
			     BASH PATCH REPORT
462fb2
			     =================
462fb2
462fb2
Bash-Release:	4.2
462fb2
Patch-ID:	bash42-004
462fb2
462fb2
Bug-Reported-by:	Mike Frysinger <vapier@gentoo.org>
462fb2
Bug-Reference-ID:	<201102182106.17834.vapier@gentoo.org>
462fb2
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00222.html
462fb2
462fb2
Bug-Description:
462fb2
462fb2
When used in contexts where word splitting and quote removal were not
462fb2
performed, such as pattern removal or pattern substitution, empty strings
462fb2
(either literal or resulting from quoted variables that were unset or
462fb2
null) were not matched correctly, resulting in failure.
462fb2
462fb2
Patch (apply with `patch -p0'):
462fb2
462fb2
*** ../bash-4.2-patched/subst.c	2011-01-02 16:12:51.000000000 -0500
462fb2
--- subst.c	2011-02-18 22:30:13.000000000 -0500
462fb2
***************
462fb2
*** 3373,3379 ****
462fb2
    if (string == 0 || *string == '\0')
462fb2
      return (WORD_LIST *)NULL;
462fb2
  
462fb2
!   td.flags = 0;
462fb2
    td.word = string;
462fb2
    tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
462fb2
    return (tresult);
462fb2
--- 3373,3379 ----
462fb2
    if (string == 0 || *string == '\0')
462fb2
      return (WORD_LIST *)NULL;
462fb2
  
462fb2
!   td.flags = W_NOSPLIT2;		/* no splitting, remove "" and '' */
462fb2
    td.word = string;
462fb2
    tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
462fb2
    return (tresult);
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 3
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 4
462fb2
  
462fb2
  #endif /* _PATCHLEVEL_H_ */