Merge pull request #2426 from Rmys/master

bash ver. bump
This commit is contained in:
Rmys
2026-06-13 21:38:11 +03:00
committed by GitHub
4 changed files with 211 additions and 0 deletions
@@ -0,0 +1,54 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-013
Bug-Reported-by: Florian Schmaus <flo@geekplace.eu>
Bug-Reference-ID:
Bug-Reference-URL: https://savannah.gnu.org/bugs/?67586
Bug-Description:
Comparing the value of a pointer returned from realloc/xrealloc to the
original pointer passed is technically undefined behavior, which matters
under some circumstances.
Patch (apply with `patch -p0'):
*** ../bash-5.3-patched/builtins/read.def Wed Jun 25 15:50:18 2025
--- builtins/read.def Thu Nov 20 15:10:20 2025
***************
*** 789,794 ****
x = (char *)xrealloc (input_string, size += 128);
! /* Only need to change unwind-protect if input_string changes */
if (x != input_string)
{
input_string = x;
--- 816,824 ----
x = (char *)xrealloc (input_string, size += 128);
! #if 0
! /* This is, in theory, undefined behavior, since input_string may
! have been freed. */
if (x != input_string)
+ #endif
{
input_string = x;
*** ../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 12
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 13
#endif /* _PATCHLEVEL_H_ */
@@ -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_ */
@@ -0,0 +1,79 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-015
Bug-Reported-by: Duncan Roe <duncan_roe@optusnet.com.au>
Grisha Levit <grishalevit@gmail.com>
Bug-Reference-ID:
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-09/msg00162.html
https://lists.gnu.org/archive/html/bug-bash/2025-10/msg00013.html
Bug-Description:
There are circumstances under which index -1 is used to reference into
the input buffer used by the `read' builtin.
Patch (apply with `patch -p0'):
*** ../bash-5.3-patched/builtins/read.def Wed Jun 25 15:50:18 2025
--- builtins/read.def Thu Nov 6 16:51:14 2025
***************
*** 539,543 ****
protects, then restore input_string so we can use it later */
orig_input_string = 0;
! input_string[i] = '\0'; /* make sure it's terminated */
if (i == 0)
{
--- 568,573 ----
protects, then restore input_string so we can use it later */
orig_input_string = 0;
! if (i >= 0)
! input_string[i] = '\0'; /* make sure it's terminated */
if (i == 0)
{
***************
*** 593,598 ****
ttset = ttattrs;
! i = silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset);
! if (i < 0)
sh_ttyerror (1);
tty_modified = 1;
--- 623,627 ----
ttset = ttattrs;
! if ((silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset)) < 0)
sh_ttyerror (1);
tty_modified = 1;
***************
*** 610,615 ****
ttset = ttattrs;
! i = ttfd_noecho (fd, &ttset); /* ttnoecho (); */
! if (i < 0)
sh_ttyerror (1);
--- 639,643 ----
ttset = ttattrs;
! if (ttfd_noecho (fd, &ttset) < 0)
sh_ttyerror (1);
*** ../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 14
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 15
#endif /* _PATCHLEVEL_H_ */
+10
View File
@@ -31,6 +31,9 @@
<Patch>official/bash53-010.patch</Patch> <Patch>official/bash53-010.patch</Patch>
<Patch>official/bash53-011.patch</Patch> <Patch>official/bash53-011.patch</Patch>
<Patch>official/bash53-012.patch</Patch> <Patch>official/bash53-012.patch</Patch>
<Patch>official/bash53-013.patch</Patch>
<Patch>official/bash53-014.patch</Patch>
<Patch>official/bash53-015.patch</Patch>
<!-- Fedora patches --> <!-- Fedora patches -->
<!-- <Patch level="1">fedora/bash-2.03-paths.patch</Patch> --> <!-- <Patch level="1">fedora/bash-2.03-paths.patch</Patch> -->
@@ -79,6 +82,13 @@
</Package> </Package>
<History> <History>
<Update release="23">
<Date>2026-06-13</Date>
<Version>5.3.15</Version>
<Comment>Version bump.</Comment>
<Name>Pisi Linux Community</Name>
<Email>admin@pisilinux.org</Email>
</Update>
<Update release="22"> <Update release="22">
<Date>2026-06-06</Date> <Date>2026-06-06</Date>
<Version>5.3.12</Version> <Version>5.3.12</Version>