7 Bug-Reported-by: Ruediger Kuhlmann <RKuhlmann@orga-systems.com>
8 Bug-Reference-ID: <OFDE975207.0C3622E5-ONC12579F3.00361A06-C12579F3.00365E39@orga-systems.com>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00010.html
13 Bash-4.2 has problems with DEL characters in the expanded value of variables
14 used in the same quoted string as variables that expand to nothing.
16 Patch (apply with `patch -p0'):
18 *** ../bash-20120427/subst.c 2012-04-22 16:19:10.000000000 -0400
19 --- subst.c 2012-05-07 16:06:35.000000000 -0400
23 dispose_word_desc (tword);
25 + /* Kill quoted nulls; we will add them back at the end of
26 + expand_word_internal if nothing else in the string */
27 + if (had_quoted_null && temp && QUOTED_NULL (temp))
30 + temp = (char *)NULL;
37 if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
38 tword->flags |= W_QUOTED;
39 ! if (had_quoted_null)
40 tword->flags |= W_HASQUOTEDNULL;
41 list = make_word_list (tword, (WORD_LIST *)NULL);
43 if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
44 tword->flags |= W_QUOTED;
45 ! if (had_quoted_null && QUOTED_NULL (istring))
46 tword->flags |= W_HASQUOTEDNULL;
47 list = make_word_list (tword, (WORD_LIST *)NULL);
50 if (word->flags & W_NOEXPAND)
51 tword->flags |= W_NOEXPAND;
52 ! if (had_quoted_null)
53 tword->flags |= W_HASQUOTEDNULL; /* XXX */
54 list = make_word_list (tword, (WORD_LIST *)NULL);
56 if (word->flags & W_NOEXPAND)
57 tword->flags |= W_NOEXPAND;
58 ! if (had_quoted_null && QUOTED_NULL (istring))
59 tword->flags |= W_HASQUOTEDNULL; /* XXX */
60 list = make_word_list (tword, (WORD_LIST *)NULL);
61 *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
62 --- patchlevel.h Thu Feb 24 21:41:34 2011
65 looks for to find the patch level (for the sccs version string). */
67 ! #define PATCHLEVEL 31
69 #endif /* _PATCHLEVEL_H_ */
71 looks for to find the patch level (for the sccs version string). */
73 ! #define PATCHLEVEL 32
75 #endif /* _PATCHLEVEL_H_ */