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