summaryrefslogtreecommitdiff
path: root/core/bash/bash53-014
diff options
context:
space:
mode:
authorrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
committerrawnix ports <ports@rawnix.org>2026-09-26 18:19:05 +0000
commitc82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch)
tree56d864b5a5c6c145edd96178ae219a8f90e191a6 /core/bash/bash53-014
downloadports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'core/bash/bash53-014')
-rw-r--r--core/bash/bash53-01468
1 files changed, 68 insertions, 0 deletions
diff --git a/core/bash/bash53-014 b/core/bash/bash53-014
new file mode 100644
index 0000000..d52d34d
--- /dev/null
+++ b/core/bash/bash53-014
@@ -0,0 +1,68 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.3
+Patch-ID: bash53-014
+
+Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
+Bug-Reference-ID:
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-06/msg00022.html
+
+Bug-Description:
+
+Bash-5.3 patch 11 included an inadvertent extra line, which this patch
+removes. This also takes the opportunity to improve that patch, by looking
+up the variable each time through the line-reading loop only if there is
+a callback and it is invoked.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.3-patched/builtins/mapfile.def Sat Jun 6 13:31:02 2026
+--- builtins/mapfile.def Sat Jun 6 13:51:55 2026
+***************
+*** 198,211 ****
+
+ run_callback (callback, array_index, line);
+- }
+
+! /* Bad things can happen if the callback modifies ENTRY, e.g.,
+! unsetting it or changing it to a non-indexed-array type, so we
+! look it up again every time we need to assign something */
+! entry = bind_array_variable (array_name, array_index, line, 0);
+! if (entry == 0 || ASSIGN_DISALLOWED (entry, 0))
+! return EXECUTION_FAILURE;
+!
+! bind_array_element (entry, array_index, line, 0);
+
+ /* Have we exceeded # of lines to store? */
+--- 198,211 ----
+
+ run_callback (callback, array_index, line);
+
+! /* Bad things can happen if the callback modifies ENTRY, e.g.,
+! unsetting it or changing it to a non-indexed-array type, so we
+! look it up again every time we need to assign something */
+! entry = bind_array_variable (array_name, array_index, line, 0);
+! if (entry == 0 || ASSIGN_DISALLOWED (entry, 0))
+! return EXECUTION_FAILURE;
+! }
+! else
+! bind_array_element (entry, array_index, line, 0);
+
+ /* Have we exceeded # of lines to store? */
+
+*** ../bash-5.3/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 13
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */