|
|
ff19ae |
BASH PATCH REPORT
|
|
|
ff19ae |
=================
|
|
|
ff19ae |
|
|
|
ff19ae |
Bash-Release: 4.2
|
|
|
ff19ae |
Patch-ID: bash42-046
|
|
|
ff19ae |
|
|
|
ff19ae |
Bug-Reported-by: "Theodoros V. Kalamatianos" <thkala@gmail.com>
|
|
|
ff19ae |
Bug-Reference-ID: <20140112011131.GE17667@infinity.metashade.com>
|
|
|
ff19ae |
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-01/msg00044.html
|
|
|
ff19ae |
|
|
|
ff19ae |
Bug-Description:
|
|
|
ff19ae |
|
|
|
ff19ae |
Bash-4.2 patch 32 introduced a problem with "$@" and arrays expanding empty
|
|
|
ff19ae |
positional parameters or array elements when using substring expansion,
|
|
|
ff19ae |
pattern substitution, or case modfication. The empty parameters or array
|
|
|
ff19ae |
elements are removed instead of expanding to empty strings ("").
|
|
|
ff19ae |
|
|
|
ff19ae |
Patch (apply with `patch -p0'):
|
|
|
ff19ae |
|
|
|
ff19ae |
*** ../bash-4.2-patched/subst.c 2012-12-31 11:52:56.000000000 -0500
|
|
|
ff19ae |
--- subst.c 2014-03-31 14:19:56.000000000 -0400
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 7243,7247 ****
|
|
|
ff19ae |
ret = alloc_word_desc ();
|
|
|
ff19ae |
ret->word = temp1;
|
|
|
ff19ae |
! if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
|
|
|
ff19ae |
ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
|
|
|
ff19ae |
return ret;
|
|
|
ff19ae |
--- 7243,7253 ----
|
|
|
ff19ae |
ret = alloc_word_desc ();
|
|
|
ff19ae |
ret->word = temp1;
|
|
|
ff19ae |
! /* We test quoted_dollar_atp because we want variants with double-quoted
|
|
|
ff19ae |
! "$@" to take a different code path. In fact, we make sure at the end
|
|
|
ff19ae |
! of expand_word_internal that we're only looking at these flags if
|
|
|
ff19ae |
! quoted_dollar_at == 0. */
|
|
|
ff19ae |
! if (temp1 &&
|
|
|
ff19ae |
! (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) &&
|
|
|
ff19ae |
! QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
|
|
|
ff19ae |
ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
|
|
|
ff19ae |
return ret;
|
|
|
ff19ae |
*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
|
|
|
ff19ae |
--- patchlevel.h Thu Feb 24 21:41:34 2011
|
|
|
ff19ae |
***************
|
|
|
ff19ae |
*** 26,30 ****
|
|
|
ff19ae |
looks for to find the patch level (for the sccs version string). */
|
|
|
ff19ae |
|
|
|
ff19ae |
! #define PATCHLEVEL 45
|
|
|
ff19ae |
|
|
|
ff19ae |
#endif /* _PATCHLEVEL_H_ */
|
|
|
ff19ae |
--- 26,30 ----
|
|
|
ff19ae |
looks for to find the patch level (for the sccs version string). */
|
|
|
ff19ae |
|
|
|
ff19ae |
! #define PATCHLEVEL 46
|
|
|
ff19ae |
|
|
|
ff19ae |
#endif /* _PATCHLEVEL_H_ */
|