]> git.pld-linux.org Git - packages/bash.git/blame - bash42-001
up to 4.2.45
[packages/bash.git] / bash42-001
CommitLineData
74aff021
AM
1 BASH PATCH REPORT
2 =================
3
4Bash-Release: 4.2
5Patch-ID: bash42-001
6
7Bug-Reported-by: Juergen Daubert <jue@jue.li>
8Bug-Reference-ID: <20110214175132.GA19813@jue.netz>
9Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00125.html
10
11Bug-Description:
12
13When running in Posix mode, bash does not correctly expand the right-hand
14side of a double-quoted word expansion containing single quotes.
15
16Patch (apply with `patch -p0'):
17
18*** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500
19--- subst.c 2011-02-19 00:00:00.000000000 -0500
20***************
21*** 1380,1387 ****
22
23 /* The handling of dolbrace_state needs to agree with the code in parse.y:
24! parse_matched_pair() */
25! dolbrace_state = 0;
26! if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
27! dolbrace_state = (flags & SX_POSIXEXP) ? DOLBRACE_QUOTE : DOLBRACE_PARAM;
28
29 i = *sindex;
30--- 1380,1389 ----
31
32 /* The handling of dolbrace_state needs to agree with the code in parse.y:
33! parse_matched_pair(). The different initial value is to handle the
34! case where this function is called to parse the word in
35! ${param op word} (SX_WORD). */
36! dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM;
37! if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP))
38! dolbrace_state = DOLBRACE_QUOTE;
39
40 i = *sindex;
41***************
42*** 7177,7181 ****
43 /* Extract the contents of the ${ ... } expansion
44 according to the Posix.2 rules. */
45! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#') ? SX_POSIXEXP : 0);
46 if (string[sindex] == RBRACE)
47 sindex++;
48--- 7181,7185 ----
49 /* Extract the contents of the ${ ... } expansion
50 according to the Posix.2 rules. */
51! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD);
52 if (string[sindex] == RBRACE)
53 sindex++;
54*** ../bash-4.2-patched/subst.h 2010-12-02 20:21:29.000000000 -0500
55--- subst.h 2011-02-16 21:12:09.000000000 -0500
56***************
57*** 57,60 ****
58--- 57,61 ----
59 #define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */
60 #define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */
61+ #define SX_WORD 0x0200 /* extracting word in ${param op word} */
62
63 /* Remove backslashes which are quoting backquotes from STRING. Modifies
64*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
65--- patchlevel.h Thu Feb 24 21:41:34 2011
66***************
67*** 26,30 ****
68 looks for to find the patch level (for the sccs version string). */
69
70! #define PATCHLEVEL 0
71
72 #endif /* _PATCHLEVEL_H_ */
73--- 26,30 ----
74 looks for to find the patch level (for the sccs version string). */
75
76! #define PATCHLEVEL 1
77
78 #endif /* _PATCHLEVEL_H_ */
This page took 0.042834 seconds and 4 git commands to generate.