]>
Commit | Line | Data |
---|---|---|
24acfa14 MT |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 3.2 | |
5 | Patch-ID: bash32-033 | |
6 | ||
7 | Bug-Reported-by: Christophe Martin <schplurtz@free.fr> | |
8 | Bug-Reference-ID: <465ABA4A.3030805@free.fr> | |
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-05/msg00104.html | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | References made within a function to an uninitialized local array variable | |
14 | using the [*] subscript in a double-quoted string can result in spurious | |
15 | ASCII 127 characters in the expanded value. | |
16 | ||
17 | Patch: | |
18 | ||
19 | *** ../bash-3.2-patched/arrayfunc.c 2007-08-25 13:47:05.000000000 -0400 | |
20 | --- arrayfunc.c 2007-05-31 11:55:46.000000000 -0400 | |
21 | *************** | |
22 | *** 723,727 **** | |
23 | { | |
24 | if (rtype) | |
25 | ! *rtype = 1; | |
26 | if (allow_all == 0) | |
27 | { | |
28 | --- 723,727 ---- | |
29 | { | |
30 | if (rtype) | |
31 | ! *rtype = (t[0] == '*') ? 1 : 2; | |
32 | if (allow_all == 0) | |
33 | { | |
34 | *** ../bash-3.2-patched/subst.c 2007-08-25 13:47:08.000000000 -0400 | |
35 | --- subst.c 2007-11-14 15:43:00.000000000 -0500 | |
36 | *************** | |
37 | *** 4908,4915 **** | |
38 | intmax_t arg_index; | |
39 | SHELL_VAR *var; | |
40 | ! int atype; | |
41 | ||
42 | ret = 0; | |
43 | temp = 0; | |
44 | ||
45 | /* Handle multiple digit arguments, as in ${11}. */ | |
46 | --- 4973,4981 ---- | |
47 | intmax_t arg_index; | |
48 | SHELL_VAR *var; | |
49 | ! int atype, rflags; | |
50 | ||
51 | ret = 0; | |
52 | temp = 0; | |
53 | + rflags = 0; | |
54 | ||
55 | /* Handle multiple digit arguments, as in ${11}. */ | |
56 | *************** | |
57 | *** 4944,4947 **** | |
58 | --- 5010,5015 ---- | |
59 | ? quote_string (temp) | |
60 | : quote_escapes (temp); | |
61 | + else if (atype == 1 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) | |
62 | + rflags |= W_HASQUOTEDNULL; | |
63 | } | |
64 | #endif | |
65 | *************** | |
66 | *** 4971,4974 **** | |
67 | --- 5039,5043 ---- | |
68 | ret = alloc_word_desc (); | |
69 | ret->word = temp; | |
70 | + ret->flags |= rflags; | |
71 | } | |
72 | return ret; | |
73 | *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 | |
74 | --- patchlevel.h Mon Oct 16 14:22:54 2006 | |
75 | *************** | |
76 | *** 26,30 **** | |
77 | looks for to find the patch level (for the sccs version string). */ | |
78 | ||
79 | ! #define PATCHLEVEL 32 | |
80 | ||
81 | #endif /* _PATCHLEVEL_H_ */ | |
82 | --- 26,30 ---- | |
83 | looks for to find the patch level (for the sccs version string). */ | |
84 | ||
85 | ! #define PATCHLEVEL 33 | |
86 | ||
87 | #endif /* _PATCHLEVEL_H_ */ | |
88 |