slackware-current/source/a/bash/bash-5.2-patches/bash52-023
Patrick J Volkerding b12c0fed43 Sun Jan 14 19:16:48 UTC 2024
a/bash-5.2.026-x86_64-1.txz:  Upgraded.
a/cpio-2.15-x86_64-1.txz:  Upgraded.
kde/kdeconnect-kde-23.08.4-x86_64-2.txz:  Rebuilt.
  Recompiled against pulseaudio-qt-1.4.0.
l/libidn-1.42-x86_64-1.txz:  Upgraded.
l/libpsl-0.21.5-x86_64-1.txz:  Upgraded.
2024-01-14 20:58:46 +01:00

64 lines
1.8 KiB
Text

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_ */