gnuplot: update to 6.0.2
[oi-userland.git] / components / shell / bash / patches / bash52-004.patch
blobd0834c19c7aa7ce2b6eaaafbf8c49cb2f5196f4e
1 BASH PATCH REPORT
2 =================
4 Bash-Release: 5.2
5 Patch-ID: bash52-004
7 Bug-Reported-by: Antoine <bug-bash@glitchimini.net>
8 Bug-Reference-ID: <8bd59753-05ff-9b09-2337-2c7f52ded650@glitchimini.net>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00022.html
11 Bug-Description:
13 Bash needs to keep better track of nested brace expansions to avoid problems
14 with quoting and POSIX semantics.
16 Patch (apply with `patch -p0'):
18 *** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400
19 --- subst.c 2022-10-06 15:19:08.000000000 -0400
20 ***************
21 *** 1799,1802 ****
22 --- 1804,1810 ----
25 + #define PARAMEXPNEST_MAX 32 // for now
26 + static int dbstate[PARAMEXPNEST_MAX];
28 /* Extract a parameter expansion expression within ${ and } from STRING.
29 Obey the Posix.2 rules for finding the ending `}': count braces while
30 ***************
31 *** 1829,1832 ****
32 --- 1837,1842 ----
33 return (extract_heredoc_dolbrace_string (string, sindex, quoted, flags));
35 + dbstate[0] = dolbrace_state;
37 pass_character = 0;
38 nesting_level = 1;
39 ***************
40 *** 1853,1856 ****
41 --- 1863,1868 ----
42 if (string[i] == '$' && string[i+1] == LBRACE)
44 + if (nesting_level < PARAMEXPNEST_MAX)
45 + dbstate[nesting_level] = dolbrace_state;
46 nesting_level++;
47 i += 2;
48 ***************
49 *** 1865,1868 ****
50 --- 1877,1881 ----
51 if (nesting_level == 0)
52 break;
53 + dolbrace_state = (nesting_level < PARAMEXPNEST_MAX) ? dbstate[nesting_level] : dbstate[0]; /* Guess using initial state */
54 i++;
55 continue;
56 *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
57 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
58 ***************
59 *** 26,30 ****
60 looks for to find the patch level (for the sccs version string). */
62 ! #define PATCHLEVEL 3
64 #endif /* _PATCHLEVEL_H_ */
65 --- 26,30 ----
66 looks for to find the patch level (for the sccs version string). */
68 ! #define PATCHLEVEL 4
70 #endif /* _PATCHLEVEL_H_ */