|
1 BASH PATCH REPORT |
|
2 ================= |
|
3 |
|
4 Bash-Release: 4.2 |
|
5 Patch-ID: bash42-032 |
|
6 |
|
7 Bug-Reported-by: Ruediger Kuhlmann <[email protected]> |
|
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 |
|
10 |
|
11 Bug-Description: |
|
12 |
|
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. |
|
15 |
|
16 Patch (apply with `patch -p0'): |
|
17 |
|
18 *** ../bash-20120427/subst.c 2012-04-22 16:19:10.000000000 -0400 |
|
19 --- subst.c 2012-05-07 16:06:35.000000000 -0400 |
|
20 *************** |
|
21 *** 8152,8155 **** |
|
22 --- 8152,8163 ---- |
|
23 dispose_word_desc (tword); |
|
24 |
|
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)) |
|
28 + { |
|
29 + FREE (temp); |
|
30 + temp = (char *)NULL; |
|
31 + } |
|
32 + |
|
33 goto add_string; |
|
34 break; |
|
35 *************** |
|
36 *** 8556,8560 **** |
|
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); |
|
42 --- 8564,8568 ---- |
|
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); |
|
48 *************** |
|
49 *** 8587,8591 **** |
|
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); |
|
55 --- 8595,8599 ---- |
|
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 |
|
63 *************** |
|
64 *** 26,30 **** |
|
65 looks for to find the patch level (for the sccs version string). */ |
|
66 |
|
67 ! #define PATCHLEVEL 31 |
|
68 |
|
69 #endif /* _PATCHLEVEL_H_ */ |
|
70 --- 26,30 ---- |
|
71 looks for to find the patch level (for the sccs version string). */ |
|
72 |
|
73 ! #define PATCHLEVEL 32 |
|
74 |
|
75 #endif /* _PATCHLEVEL_H_ */ |