summaryrefslogtreecommitdiffstats
path: root/source/a/bash/bash-5.2-patches/bash52-023
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/bash/bash-5.2-patches/bash52-023')
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02364
1 files changed, 64 insertions, 0 deletions
diff --git a/source/a/bash/bash-5.2-patches/bash52-023 b/source/a/bash/bash-5.2-patches/bash52-023
new file mode 100644
index 000000000..07ba4ae43
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-023
@@ -0,0 +1,64 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-023
+
+Bug-Reported-by: Emanuele Torre <torreemanuele6@gmail.com>
+Bug-Reference-ID: <20230206140824.1710288-1-torreemanuele6@gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00045.html
+
+Bug-Description:
+
+Running `local -' multiple times in a shell function would overwrite the
+original saved set of options.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/builtins/declare.def 2023-01-04 20:40:28.000000000 -0500
+--- builtins/declare.def 2023-02-08 15:36:49.000000000 -0500
+***************
+*** 421,429 ****
+ if (local_var && variable_context && STREQ (name, "-"))
+ {
+ var = make_local_variable ("-", 0);
+! FREE (value_cell (var)); /* just in case */
+! value = get_current_options ();
+! var_setvalue (var, value);
+! VSETATTR (var, att_invisible);
+ NEXT_VARIABLE ();
+ }
+--- 421,437 ----
+ if (local_var && variable_context && STREQ (name, "-"))
+ {
++ int o;
++
++ o = localvar_inherit;
++ localvar_inherit = 0;
+ var = make_local_variable ("-", 0);
+! localvar_inherit = o;
+!
+! if (value_cell (var) == NULL) /* no duplicate instances */
+! {
+! value = get_current_options ();
+! var_setvalue (var, value);
+! VSETATTR (var, att_invisible);
+! }
+ NEXT_VARIABLE ();
+ }
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 22
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 23
+
+ #endif /* _PATCHLEVEL_H_ */