|
|
462fb2 |
BASH PATCH REPORT
|
|
|
462fb2 |
=================
|
|
|
462fb2 |
|
|
|
462fb2 |
Bash-Release: 4.2
|
|
|
462fb2 |
Patch-ID: bash42-032
|
|
|
462fb2 |
|
|
|
462fb2 |
Bug-Reported-by: Ruediger Kuhlmann <RKuhlmann@orga-systems.com>
|
|
|
462fb2 |
Bug-Reference-ID: <OFDE975207.0C3622E5-ONC12579F3.00361A06-C12579F3.00365E39@orga-systems.com>
|
|
|
462fb2 |
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00010.html
|
|
|
462fb2 |
|
|
|
462fb2 |
Bug-Description:
|
|
|
462fb2 |
|
|
|
462fb2 |
Bash-4.2 has problems with DEL characters in the expanded value of variables
|
|
|
462fb2 |
used in the same quoted string as variables that expand to nothing.
|
|
|
462fb2 |
|
|
|
462fb2 |
Patch (apply with `patch -p0'):
|
|
|
462fb2 |
|
|
|
462fb2 |
*** ../bash-20120427/subst.c 2012-04-22 16:19:10.000000000 -0400
|
|
|
462fb2 |
--- subst.c 2012-05-07 16:06:35.000000000 -0400
|
|
|
462fb2 |
***************
|
|
|
462fb2 |
*** 8152,8155 ****
|
|
|
462fb2 |
--- 8152,8163 ----
|
|
|
462fb2 |
dispose_word_desc (tword);
|
|
|
462fb2 |
|
|
|
462fb2 |
+ /* Kill quoted nulls; we will add them back at the end of
|
|
|
462fb2 |
+ expand_word_internal if nothing else in the string */
|
|
|
462fb2 |
+ if (had_quoted_null && temp && QUOTED_NULL (temp))
|
|
|
462fb2 |
+ {
|
|
|
462fb2 |
+ FREE (temp);
|
|
|
462fb2 |
+ temp = (char *)NULL;
|
|
|
462fb2 |
+ }
|
|
|
462fb2 |
+
|
|
|
462fb2 |
goto add_string;
|
|
|
462fb2 |
break;
|
|
|
462fb2 |
***************
|
|
|
462fb2 |
*** 8556,8560 ****
|
|
|
462fb2 |
if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
|
|
|
462fb2 |
tword->flags |= W_QUOTED;
|
|
|
462fb2 |
! if (had_quoted_null)
|
|
|
462fb2 |
tword->flags |= W_HASQUOTEDNULL;
|
|
|
462fb2 |
list = make_word_list (tword, (WORD_LIST *)NULL);
|
|
|
462fb2 |
--- 8564,8568 ----
|
|
|
462fb2 |
if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
|
|
|
462fb2 |
tword->flags |= W_QUOTED;
|
|
|
462fb2 |
! if (had_quoted_null && QUOTED_NULL (istring))
|
|
|
462fb2 |
tword->flags |= W_HASQUOTEDNULL;
|
|
|
462fb2 |
list = make_word_list (tword, (WORD_LIST *)NULL);
|
|
|
462fb2 |
***************
|
|
|
462fb2 |
*** 8587,8591 ****
|
|
|
462fb2 |
if (word->flags & W_NOEXPAND)
|
|
|
462fb2 |
tword->flags |= W_NOEXPAND;
|
|
|
462fb2 |
! if (had_quoted_null)
|
|
|
462fb2 |
tword->flags |= W_HASQUOTEDNULL; /* XXX */
|
|
|
462fb2 |
list = make_word_list (tword, (WORD_LIST *)NULL);
|
|
|
462fb2 |
--- 8595,8599 ----
|
|
|
462fb2 |
if (word->flags & W_NOEXPAND)
|
|
|
462fb2 |
tword->flags |= W_NOEXPAND;
|
|
|
462fb2 |
! if (had_quoted_null && QUOTED_NULL (istring))
|
|
|
462fb2 |
tword->flags |= W_HASQUOTEDNULL; /* XXX */
|
|
|
462fb2 |
list = make_word_list (tword, (WORD_LIST *)NULL);
|
|
|
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 31
|
|
|
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 32
|
|
|
462fb2 |
|
|
|
462fb2 |
#endif /* _PATCHLEVEL_H_ */
|