7 Bug-Reported-by: David Sines <dave.gma@googlemail.com>
8 Bug-Reference-ID: <CAO3BAa_CK_Rgkhdfzs+NJ4KFYdB9qW3pvXQK0xLCi6GMmDU8bw@mail.gmail.com>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00037.html
13 When in Posix mode, bash did not correctly interpret the ANSI-C-style
14 $'...' quoting mechanism when performing pattern substitution word
15 expansions within double quotes.
17 Patch (apply with `patch -p0'):
21 @@ -3398,7 +3398,7 @@ parse_matched_pair (qc, open, close, len
22 within a double-quoted ${...} construct "an even number of
23 unescaped double-quotes or single-quotes, if any, shall occur." */
24 /* This was changed in Austin Group Interp 221 */
25 - if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
26 + if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2 && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
29 /* Could also check open == '`' if we want to parse grouping constructs
32 @@ -5710,7 +5710,7 @@ parse_matched_pair (qc, open, close, len
33 within a double-quoted ${...} construct "an even number of
34 unescaped double-quotes or single-quotes, if any, shall occur." */
35 /* This was changed in Austin Group Interp 221 */
36 - if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
37 + if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2 && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
40 /* Could also check open == '`' if we want to parse grouping constructs
44 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
45 looks for to find the patch level (for the sccs version string). */
50 #endif /* _PATCHLEVEL_H_ */