7 Bug-Reported-by: Glenn Jackman <glenn.jackman@gmail.com>
8 Bug-Reference-ID: <CAFC8ewQDx7hzNJzveuJ5o4FWo=ij7MzckiJVN_6NXjp504QZeg@mail.gmail.com>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00095.html
13 Array subscript expansion can inappropriately quote brackets if the expression
16 Patch (apply with `patch -p0'):
18 *** ../bash-20221015/subst.c 2022-10-18 10:47:33.000000000 -0500
19 --- subst.c 2022-10-20 11:41:07.000000000 -0500
25 + /* We don't perform process substitution in arithmetic expressions, so don't
26 + bother checking for it. */
27 + #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
29 /* If there are any characters in STRING that require full expansion,
30 then call FUNC to expand STRING; otherwise just perform quote
35 ! if (EXP_CHAR (string[i]))
37 else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
41 ! if (ARITH_EXP_CHAR (string[i]))
43 else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
44 *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
45 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
48 looks for to find the patch level (for the sccs version string). */
50 ! #define PATCHLEVEL 7
52 #endif /* _PATCHLEVEL_H_ */
54 looks for to find the patch level (for the sccs version string). */
56 ! #define PATCHLEVEL 8
58 #endif /* _PATCHLEVEL_H_ */