Roman Rakus ee79c0
			     BASH PATCH REPORT
Roman Rakus ee79c0
			     =================
Roman Rakus ee79c0
Roman Rakus ee79c0
Bash-Release:	4.2
Roman Rakus ee79c0
Patch-ID:	bash42-004
Roman Rakus ee79c0
Roman Rakus ee79c0
Bug-Reported-by:	Mike Frysinger <vapier@gentoo.org>
Roman Rakus ee79c0
Bug-Reference-ID:	<201102182106.17834.vapier@gentoo.org>
Roman Rakus ee79c0
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00222.html
Roman Rakus ee79c0
Roman Rakus ee79c0
Bug-Description:
Roman Rakus ee79c0
Roman Rakus ee79c0
When used in contexts where word splitting and quote removal were not
Roman Rakus ee79c0
performed, such as pattern removal or pattern substitution, empty strings
Roman Rakus ee79c0
(either literal or resulting from quoted variables that were unset or
Roman Rakus ee79c0
null) were not matched correctly, resulting in failure.
Roman Rakus ee79c0
Roman Rakus ee79c0
Patch (apply with `patch -p0'):
Roman Rakus ee79c0
Roman Rakus ee79c0
*** ../bash-4.2-patched/subst.c	2011-01-02 16:12:51.000000000 -0500
Roman Rakus ee79c0
--- subst.c	2011-02-18 22:30:13.000000000 -0500
Roman Rakus ee79c0
***************
Roman Rakus ee79c0
*** 3373,3379 ****
Roman Rakus ee79c0
    if (string == 0 || *string == '\0')
Roman Rakus ee79c0
      return (WORD_LIST *)NULL;
Roman Rakus ee79c0
  
Roman Rakus ee79c0
!   td.flags = 0;
Roman Rakus ee79c0
    td.word = string;
Roman Rakus ee79c0
    tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
Roman Rakus ee79c0
    return (tresult);
Roman Rakus ee79c0
--- 3373,3379 ----
Roman Rakus ee79c0
    if (string == 0 || *string == '\0')
Roman Rakus ee79c0
      return (WORD_LIST *)NULL;
Roman Rakus ee79c0
  
Roman Rakus ee79c0
!   td.flags = W_NOSPLIT2;		/* no splitting, remove "" and '' */
Roman Rakus ee79c0
    td.word = string;
Roman Rakus ee79c0
    tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
Roman Rakus ee79c0
    return (tresult);
Roman Rakus ee79c0
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
Roman Rakus ee79c0
--- patchlevel.h	Thu Feb 24 21:41:34 2011
Roman Rakus ee79c0
***************
Roman Rakus ee79c0
*** 26,30 ****
Roman Rakus ee79c0
     looks for to find the patch level (for the sccs version string). */
Roman Rakus ee79c0
  
Roman Rakus ee79c0
! #define PATCHLEVEL 3
Roman Rakus ee79c0
  
Roman Rakus ee79c0
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus ee79c0
--- 26,30 ----
Roman Rakus ee79c0
     looks for to find the patch level (for the sccs version string). */
Roman Rakus ee79c0
  
Roman Rakus ee79c0
! #define PATCHLEVEL 4
Roman Rakus ee79c0
  
Roman Rakus ee79c0
  #endif /* _PATCHLEVEL_H_ */