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