]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/bash/bash52-023
Merge branch 'next'
[people/pmueller/ipfire-2.x.git] / src / patches / bash / bash52-023
CommitLineData
85db98e9
AB
1 BASH PATCH REPORT
2 =================
3
4Bash-Release: 5.2
5Patch-ID: bash52-023
6
7Bug-Reported-by: Emanuele Torre <torreemanuele6@gmail.com>
8Bug-Reference-ID: <20230206140824.1710288-1-torreemanuele6@gmail.com>
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00045.html
10
11Bug-Description:
12
13Running `local -' multiple times in a shell function would overwrite the
14original saved set of options.
15
16Patch (apply with `patch -p0'):
17
18*** ../bash-5.2-patched/builtins/declare.def 2023-01-04 20:40:28.000000000 -0500
19--- builtins/declare.def 2023-02-08 15:36:49.000000000 -0500
20***************
21*** 421,429 ****
22 if (local_var && variable_context && STREQ (name, "-"))
23 {
24 var = make_local_variable ("-", 0);
25! FREE (value_cell (var)); /* just in case */
26! value = get_current_options ();
27! var_setvalue (var, value);
28! VSETATTR (var, att_invisible);
29 NEXT_VARIABLE ();
30 }
31--- 421,437 ----
32 if (local_var && variable_context && STREQ (name, "-"))
33 {
34+ int o;
35+
36+ o = localvar_inherit;
37+ localvar_inherit = 0;
38 var = make_local_variable ("-", 0);
39! localvar_inherit = o;
40!
41! if (value_cell (var) == NULL) /* no duplicate instances */
42! {
43! value = get_current_options ();
44! var_setvalue (var, value);
45! VSETATTR (var, att_invisible);
46! }
47 NEXT_VARIABLE ();
48 }
49
50*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
51--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
52***************
53*** 26,30 ****
54 looks for to find the patch level (for the sccs version string). */
55
56! #define PATCHLEVEL 22
57
58 #endif /* _PATCHLEVEL_H_ */
59--- 26,30 ----
60 looks for to find the patch level (for the sccs version string). */
61
62! #define PATCHLEVEL 23
63
64 #endif /* _PATCHLEVEL_H_ */