diff options
Diffstat (limited to 'core/bash')
| -rw-r--r-- | core/bash/.footprint | 51 | ||||
| -rw-r--r-- | core/bash/.signature | 26 | ||||
| -rw-r--r-- | core/bash/MAKEPKG | 95 | ||||
| -rw-r--r-- | core/bash/bash53-001 | 48 | ||||
| -rw-r--r-- | core/bash/bash53-002 | 122 | ||||
| -rw-r--r-- | core/bash/bash53-003 | 82 | ||||
| -rw-r--r-- | core/bash/bash53-004 | 47 | ||||
| -rw-r--r-- | core/bash/bash53-005 | 42 | ||||
| -rw-r--r-- | core/bash/bash53-006 | 48 | ||||
| -rw-r--r-- | core/bash/bash53-007 | 56 | ||||
| -rw-r--r-- | core/bash/bash53-008 | 231 | ||||
| -rw-r--r-- | core/bash/bash53-009 | 82 | ||||
| -rw-r--r-- | core/bash/bash53-010 | 49 | ||||
| -rw-r--r-- | core/bash/bash53-011 | 70 | ||||
| -rw-r--r-- | core/bash/bash53-012 | 80 | ||||
| -rw-r--r-- | core/bash/bash53-013 | 54 | ||||
| -rw-r--r-- | core/bash/bash53-014 | 68 | ||||
| -rw-r--r-- | core/bash/bash53-015 | 79 | ||||
| -rw-r--r-- | core/bash/bash53-016 | 136 | ||||
| -rw-r--r-- | core/bash/bash53-017 | 62 | ||||
| -rw-r--r-- | core/bash/bash53-018 | 71 | ||||
| -rw-r--r-- | core/bash/bash53-019 | 133 | ||||
| -rw-r--r-- | core/bash/bash53-020 | 51 |
23 files changed, 1783 insertions, 0 deletions
diff --git a/core/bash/.footprint b/core/bash/.footprint new file mode 100644 index 0000000..30e497c --- /dev/null +++ b/core/bash/.footprint @@ -0,0 +1,51 @@ +drwxr-xr-x root/root bin/ +-rwxr-xr-x root/root bin/bash +drwxr-xr-x root/root lib/ +drwxr-xr-x root/root lib/bash/ +-rwxr-xr-x root/root lib/bash/accept +-rwxr-xr-x root/root lib/bash/basename +-rwxr-xr-x root/root lib/bash/chmod +-rwxr-xr-x root/root lib/bash/csv +-rwxr-xr-x root/root lib/bash/cut +-rwxr-xr-x root/root lib/bash/dirname +-rwxr-xr-x root/root lib/bash/dsv +-rwxr-xr-x root/root lib/bash/fdflags +-rwxr-xr-x root/root lib/bash/finfo +-rwxr-xr-x root/root lib/bash/fltexpr +-rwxr-xr-x root/root lib/bash/getconf +-rwxr-xr-x root/root lib/bash/head +-rwxr-xr-x root/root lib/bash/id +-rwxr-xr-x root/root lib/bash/kv +-rwxr-xr-x root/root lib/bash/ln +-rwxr-xr-x root/root lib/bash/logname +-rwxr-xr-x root/root lib/bash/mkdir +-rwxr-xr-x root/root lib/bash/mkfifo +-rwxr-xr-x root/root lib/bash/mktemp +-rwxr-xr-x root/root lib/bash/mypid +-rwxr-xr-x root/root lib/bash/pathchk +-rwxr-xr-x root/root lib/bash/print +-rwxr-xr-x root/root lib/bash/printenv +-rwxr-xr-x root/root lib/bash/push +-rwxr-xr-x root/root lib/bash/realpath +-rwxr-xr-x root/root lib/bash/rm +-rwxr-xr-x root/root lib/bash/rmdir +-rwxr-xr-x root/root lib/bash/seq +-rwxr-xr-x root/root lib/bash/setpgid +-rwxr-xr-x root/root lib/bash/sleep +-rwxr-xr-x root/root lib/bash/stat +-rwxr-xr-x root/root lib/bash/strftime +-rwxr-xr-x root/root lib/bash/strptime +-rwxr-xr-x root/root lib/bash/sync +-rwxr-xr-x root/root lib/bash/tee +-rwxr-xr-x root/root lib/bash/truefalse +-rwxr-xr-x root/root lib/bash/tty +-rwxr-xr-x root/root lib/bash/uname +-rwxr-xr-x root/root lib/bash/unlink +-rwxr-xr-x root/root lib/bash/whoami +drwxr-xr-x root/root lib/pkgconfig/ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/bash.1.gz +-rw-r--r-- root/root usr/share/man/man1/bashbug.1.gz diff --git a/core/bash/.signature b/core/bash/.signature new file mode 100644 index 0000000..d75fccb --- /dev/null +++ b/core/bash/.signature @@ -0,0 +1,26 @@ +RWTZ9IduCSQ/mIp/YZJyZY5m+ZMcYm9LqIEW+ofUoL32PA1pPt3mLq16zOTnEAAzhp15xD7HKEeUNE61sJgWCbGSu4hCQH6ptAM= + +SHA256 (MAKEPKG) = 5cf447d27d3eaf9c706fcf7a9ca9be42af4ca9e99d312151a00ef971a6d4a350 +SHA256 (.footprint) = fbe08656dfed78597f7f733b81c367a8a5d8c07079ba0d705b0074fe30212f6c +SHA256 (bash-5.3.tar.gz) = 0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba +SHA256 (bash53-001) = 1f608434364af86b9b45c8b0ea3fb3b165fb830d27697e6cdfc7ac17dee3287f +SHA256 (bash53-002) = e385548a00130765ec7938a56fbdca52447ab41fabc95a25f19ade527e282001 +SHA256 (bash53-003) = f245d9c7dc3f5a20d84b53d249334747940936f09dc97e1dcb89fc3ab37d60ed +SHA256 (bash53-004) = 9591d245045529f32f0812f94180b9d9ce9023f5a765c039b852e5dfc99747d0 +SHA256 (bash53-005) = cca1ef52dbbf433bc98e33269b64b2c814028efe2538be1e2c9a377da90bc99d +SHA256 (bash53-006) = 29119addefed8eff91ae37fd51822c31780ee30d4a28376e96002706c995ff10 +SHA256 (bash53-007) = c0976bbfffa1453c7cfdd62058f206a318568ff2d690f5d4fa048793fa3eb299 +SHA256 (bash53-008) = 097cd723cbfb8907674ac32214063a3fd85282657ec5b4e544d2c0f719653fb4 +SHA256 (bash53-009) = eee30fe78a4b0cb2fe20e010e00308899cfc613e0774ebb3c8557a1552f24f8c +SHA256 (bash53-010) = cf76f1cce2ea300c18bff9f002d21f280cc931acd17c28518110b93fe6e72569 +SHA256 (bash53-011) = 0298df8f5ea2a31d3be43ed7d269c5b3c7c342dd5b570bea7f64d66dcbbe7531 +SHA256 (bash53-012) = d71379b39bebaedaf123414414e77fb458a0a43b9ad3116594c6df7ca6754573 +SHA256 (bash53-013) = 042f9cda967e24bf4211944697441e93d06ff42b4b998629a98a1b249279f200 +SHA256 (bash53-014) = bd4360b401d38507e358783dcad8536a99c6789f0d3a5bd0cfb8c4a34144696c +SHA256 (bash53-015) = 55b79ceee2fc27f6767eed697e939a7eb2fe2a28c01556bd75f18d581014f46e +SHA256 (bash53-016) = 9ea29b266b7d24cb34d0ff3f1c4631e4d527bfe2d1ef15d17cdb924bf31ef767 +SHA256 (bash53-017) = 443b927b45c1558ca72052410f8b8f6e5152b617ed707061a2781d4375b0d1c3 +SHA256 (bash53-018) = ae715d76c50341d7d7095e9a8d2eeed1ca9546152c2ac7289206f90cf30ac697 +SHA256 (bash53-019) = a25c581e4d0057dea3833918438a930e2e86ee4c6dc17fe15267b7f04cbc4e3d +SHA256 (bash53-020) = df217ed3a9122aa2286d9b67bbe348661b6a9db262b580c29150dae55d532896 +SHA256 (bash#5.3.p20-1.pkg.tar.gz) = 10f08669daf663aa39aa2650545d4684d926b1175cec73c2b0006c90fb0140fe diff --git a/core/bash/MAKEPKG b/core/bash/MAKEPKG new file mode 100644 index 0000000..42754b3 --- /dev/null +++ b/core/bash/MAKEPKG @@ -0,0 +1,95 @@ +#!/bin/mkpkg +# description: An sh-compatible command language interpreter +# url: https://tiswww.case.edu/php/chet/bash/bashtop.html + +name=bash +version=5.3.p20 +_version=5.3 +release=1 +depends=(readline ncurses) +source=(https://ftp.gnu.org/gnu/$name/$name-$_version.tar.gz + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-001 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-002 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-003 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-004 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-005 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-006 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-007 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-008 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-009 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-010 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-011 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-012 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-013 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-014 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-015 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-016 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-017 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-018 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-019 + https://ftp.gnu.org/gnu/$name/$name-$_version-patches/bash53-020) + +patch() { + cd $name-$_version + for p in $SRC/bash53-*; do + patch -Np0 -i $p + done +} + +sha256sums=( + "0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba" + "1f608434364af86b9b45c8b0ea3fb3b165fb830d27697e6cdfc7ac17dee3287f" + "e385548a00130765ec7938a56fbdca52447ab41fabc95a25f19ade527e282001" + "f245d9c7dc3f5a20d84b53d249334747940936f09dc97e1dcb89fc3ab37d60ed" + "9591d245045529f32f0812f94180b9d9ce9023f5a765c039b852e5dfc99747d0" + "cca1ef52dbbf433bc98e33269b64b2c814028efe2538be1e2c9a377da90bc99d" + "29119addefed8eff91ae37fd51822c31780ee30d4a28376e96002706c995ff10" + "c0976bbfffa1453c7cfdd62058f206a318568ff2d690f5d4fa048793fa3eb299" + "097cd723cbfb8907674ac32214063a3fd85282657ec5b4e544d2c0f719653fb4" + "eee30fe78a4b0cb2fe20e010e00308899cfc613e0774ebb3c8557a1552f24f8c" + "cf76f1cce2ea300c18bff9f002d21f280cc931acd17c28518110b93fe6e72569" + "0298df8f5ea2a31d3be43ed7d269c5b3c7c342dd5b570bea7f64d66dcbbe7531" + "d71379b39bebaedaf123414414e77fb458a0a43b9ad3116594c6df7ca6754573" + "042f9cda967e24bf4211944697441e93d06ff42b4b998629a98a1b249279f200" + "bd4360b401d38507e358783dcad8536a99c6789f0d3a5bd0cfb8c4a34144696c" + "55b79ceee2fc27f6767eed697e939a7eb2fe2a28c01556bd75f18d581014f46e" + "9ea29b266b7d24cb34d0ff3f1c4631e4d527bfe2d1ef15d17cdb924bf31ef767" + "443b927b45c1558ca72052410f8b8f6e5152b617ed707061a2781d4375b0d1c3" + "ae715d76c50341d7d7095e9a8d2eeed1ca9546152c2ac7289206f90cf30ac697" + "a25c581e4d0057dea3833918438a930e2e86ee4c6dc17fe15267b7f04cbc4e3d" + "df217ed3a9122aa2286d9b67bbe348661b6a9db262b580c29150dae55d532896" +) + +build() { + cd $name-$_version + + ./configure \ + --prefix=/ \ + --mandir=/usr/share/man \ + --disable-nls \ + --without-bash-malloc \ + --disable-profiling \ + --disable-debugger \ + --with-curses \ + --with-installed-readline + + make -j1 + make DESTDIR=$PKG install + + rm -rf $PKG/include + rm -rf $PKG/share + + rm -f $PKG/bin/bashbug + rm -f $PKG/lib/bash/Makefile.inc + rm -f $PKG/lib/bash/Makefile.sample + rm -f $PKG/lib/bash/loadables.h + rm -f $PKG/lib/pkgconfig/bash.pc + rm -f $PKG/usr/share/man/man1/bashbug.1.gz +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh diff --git a/core/bash/bash53-001 b/core/bash/bash53-001 new file mode 100644 index 0000000..17c1d89 --- /dev/null +++ b/core/bash/bash53-001 @@ -0,0 +1,48 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-001 + +Bug-Reported-by: John Sidles <jasidles@gmail.com> +Bug-Reference-ID: <CAHOxHhRKa86FtRpsq-FBVciAxZ9kbo5PvfQBovBDXDFySbxj7A@mail.gmail.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00035.html + +Bug-Description: + +In posix mode, `wait -n' with pid arguments does not restrict the set of +processes it considers to those arguments. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3/jobs.c Fri Mar 7 18:48:44 2025 +--- jobs.c Mon Jul 14 10:25:13 2025 +*************** +*** 3539,3543 **** + one in bgpids. We can do this in posix mode because we'll remove any + one we find from the table, preserving existing semantics. */ +! if (posixly_correct && (t = bgp_findone ())) + { + pid = t->pid; +--- 3539,3543 ---- + one in bgpids. We can do this in posix mode because we'll remove any + one we find from the table, preserving existing semantics. */ +! if (posixly_correct && (flags & JWAIT_WAITING) == 0 && (t = bgp_findone ())) + { + pid = t->pid; + +*** ../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 0 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 1 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-002 b/core/bash/bash53-002 new file mode 100644 index 0000000..cddc90e --- /dev/null +++ b/core/bash/bash53-002 @@ -0,0 +1,122 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-002 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: https://savannah.gnu.org/bugs/?67326 + +Bug-Description: + +There are too many differences in the various implementations of shm_open(2) +to rely on it for bash's use. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/lib/sh/anonfile.c Tue Jul 9 11:41:57 2024 +--- lib/sh/anonfile.c Thu Jul 17 11:03:23 2025 +*************** +*** 26,30 **** + #include <bashtypes.h> + +! #if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_OPEN) || defined (HAVE_SHM_MKSTEMP) + # include <sys/mman.h> + #endif +--- 26,30 ---- + #include <bashtypes.h> + +! #if defined (HAVE_MEMFD_CREATE) || defined (HAVE_SHM_MKSTEMP) + # include <sys/mman.h> + #endif +*************** +*** 42,57 **** + #endif + +! #if defined (HAVE_SHM_OPEN) +! #ifndef O_NOFOLLOW +! # define O_NOFOLLOW 0 +! #endif +! + static int +- anonshmunlink (const char *fn) +- { +- return (shm_unlink (fn)); +- } +- +- static int + anonshmopen (const char *name, int flags, char **fn) + { +--- 42,47 ---- + #endif + +! #if defined (HAVE_SHM_MKSTEMP) + static int + anonshmopen (const char *name, int flags, char **fn) + { +*************** +*** 63,95 **** + *fn = 0; + +- #if defined (HAVE_SHM_MKSTEMP) + fname = savestring ("/shm-XXXXXXXXXX"); + fd = shm_mkstemp (fname); + if (fd < 0) +- free (fname); +- #endif +- +- if (fd < 0) + { +- fname = sh_mktmpname (name, flags); +- fd = shm_open (fname, O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600); +- } +- +- if (fd < 0) +- { + free (fname); + return fd; + } + +- if (shm_unlink (fname) < 0) +- { +- int o; +- o = errno; +- free (fname); +- close (fd); +- errno = o; +- return -1; +- } +- + if (fn) + *fn = fname; +--- 53,64 ---- +*************** +*** 123,127 **** + flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR; + +! #if defined (HAVE_SHM_OPEN) + fd = anonshmopen (name, flag, fn); + if (fd >= 0) +--- 92,96 ---- + flag = (name && *name == '/') ? MT_TEMPLATE : MT_USETMPDIR; + +! #if defined (HAVE_SHM_MKSTEMP) + fd = anonshmopen (name, flag, fn); + if (fd >= 0) + +*** ../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 1 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 2 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-003 b/core/bash/bash53-003 new file mode 100644 index 0000000..0fc6b42 --- /dev/null +++ b/core/bash/bash53-003 @@ -0,0 +1,82 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-003 + +Bug-Reported-by: Isabella Bosia <izaberina@gmail.com> +Bug-Reference-ID: <CAAZkfoJhQ1BJ7BGk3-ObctvCJJrW3rp_tWQXT=9rY7kGDvz4uw@mail.gmail.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-06/msg00173.html + +Bug-Description: + +Bash leaves internal quoting in place when expanding array subscripts +that appear inside array subscripts in an arithmetic context, causing +expansion failures. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/subst.c Sun May 18 15:00:13 2025 +--- subst.c Fri Jul 11 09:48:44 2025 +*************** +*** 3796,3802 **** + #endif + +! /* We don't perform process substitution in arithmetic expressions, so don't +! bother checking for it. */ +! #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~') + + /* If there are any characters in STRING that require full expansion, +--- 3796,3802 ---- + #endif + +! /* We don't perform process substitution or tilde expansion in arithmetic +! expressions, so don't bother checking for them. */ +! #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC) + + /* If there are any characters in STRING that require full expansion, +*************** +*** 12216,12219 **** +--- 12216,12227 ---- + break; + } ++ #if defined (ARRAY_VARS) ++ /* The only special characters that matter here are []~, since those ++ are backslash-quoted in expand_array_subscript but not dequoted ++ by the statement following this one. */ ++ if ((quoted & Q_ARITH) && (c == LBRACK || c == RBRACK || c == '~')) ++ ; /* placeholder here */ ++ else ++ #endif + if (((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote) && (sh_syntaxtab[c] & CBSDQUOTE) == 0) + *r++ = '\\'; +*** ../bash-5.3/tests/quotearray.right Thu Nov 10 10:39:56 2022 +--- tests/quotearray.right Thu Jul 10 15:40:27 2025 +*************** +*** 45,49 **** + 0 + 0 +! ./quotearray1.sub: line 68: 0\],b\[1: arithmetic syntax error: invalid arithmetic operator (error token is "\],b\[1") + declare -a array + 0 +--- 45,49 ---- + 0 + 0 +! ./quotearray1.sub: line 68: 0],b[1: arithmetic syntax error: invalid arithmetic operator (error token is "],b[1") + declare -a array + 0 +*** ../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 2 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 3 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-004 b/core/bash/bash53-004 new file mode 100644 index 0000000..5d7705c --- /dev/null +++ b/core/bash/bash53-004 @@ -0,0 +1,47 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-004 + +Bug-Reported-by: Emanuele Torre <torreemanuele6@gmail.com> +Bug-Reference-ID: <aHKS0uA8Sf_vMT25@ntoo> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00031.html + +Bug-Description: + +The Linux kernel reports incorrect sizes for files in /sys/block/*/uevent, +leading bash to report a read error when the byte count does not agree +with the file size from fstat(2). + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/builtins/evalfile.c Fri Sep 6 15:42:40 2024 +--- builtins/evalfile.c Fri Sep 12 11:38:57 2025 +*************** +*** 161,166 **** +--- 161,168 ---- + if (nr >= 0) + string[nr] = '\0'; ++ #if 0 + if (nr != file_size) + nr = -1; /* XXX - didn't get the whole file */ ++ #endif + } + else + +*** ../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 3 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 4 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-005 b/core/bash/bash53-005 new file mode 100644 index 0000000..2bebca8 --- /dev/null +++ b/core/bash/bash53-005 @@ -0,0 +1,42 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-005 + +Bug-Reported-by: chet.ramey@case.edu +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +Restoring the default disposition in a subshell for a signal bash treats +specially can cause a crash. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/trap.c Thu Dec 19 11:35:49 2024 +--- trap.c Fri Nov 7 11:23:31 2025 +*************** +*** 965,968 **** +--- 965,969 ---- + set_signal_handler (sig, SIG_DFL); + change_signal (sig, (char *)DEFAULT_SIG); ++ sigmodes[sig] &= ~SIG_TRAPPED; /* no longer trapped */ + return; + } +*** ../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 4 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 5 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-006 b/core/bash/bash53-006 new file mode 100644 index 0000000..95891a4 --- /dev/null +++ b/core/bash/bash53-006 @@ -0,0 +1,48 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-006 + +Bug-Reported-by: Duncan Roe <duncan_roe@optusnet.com.au> +Bug-Reference-ID: <aL0p/3BQeCLc6krz@dimstar.local.net> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-09/msg00053.html + +Bug-Description: + +When `globasciiranges' is enabled, glob patterns with ranges in bracket +expressions can produce incorrect matches for character ranges whose +start and end are non-ascii characters. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/lib/glob/smatch.c Mon May 29 14:15:17 2023 +--- lib/glob/smatch.c Mon Sep 8 12:54:59 2025 +*************** +*** 391,395 **** + return 0; + +! if (forcecoll == 0 && glob_asciirange && c1 <= UCHAR_MAX && c2 <= UCHAR_MAX) + return ((int)(c1 - c2)); + +--- 391,395 ---- + return 0; + +! if (forcecoll == 0 && glob_asciirange) + return ((int)(c1 - c2)); + +*** ../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 5 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 6 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-007 b/core/bash/bash53-007 new file mode 100644 index 0000000..58bc0d7 --- /dev/null +++ b/core/bash/bash53-007 @@ -0,0 +1,56 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-007 + +Bug-Reported-by: jdhedden@gmail.com +Bug-Reference-ID: <689ac876.050a0220.334a3f.30fb@mx.google.com> +Bug-Reference-URL: + +Bug-Description: + +No-fork command substitutions can perform redirections that act on the +enclosing command as well. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/subst.c Fri Jul 25 08:53:25 2025 +--- subst.c Tue Aug 12 15:41:01 2025 +*************** +*** 207,210 **** +--- 207,212 ---- + extern int extended_quote; + ++ extern REDIRECT *exec_redirection_undo_list, *redirection_undo_list; ++ + #if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE) + extern wchar_t *wcsdup (const wchar_t *); +*************** +*** 7001,7004 **** +--- 7003,7011 ---- + } + #endif ++ ++ unwind_protect_pointer (redirection_undo_list); ++ redirection_undo_list = NULL; ++ unwind_protect_pointer (exec_redirection_undo_list); ++ exec_redirection_undo_list = NULL; + + subst_assign_varlist = 0; + +*** ../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 6 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 7 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-008 b/core/bash/bash53-008 new file mode 100644 index 0000000..4ab9935 --- /dev/null +++ b/core/bash/bash53-008 @@ -0,0 +1,231 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-008 + +Bug-Reported-by: Grisha Levit <grishalevit@gmail.com> +Bug-Reference-ID: <20251022174207.10518-1-grishalevit@gmail.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-10/msg00145.html + +Bug-Description: + +Bash tries to consume entire multibyte characters when looking for backslash +escapes in $'...' strings, and treats too many characters as potentially +beginning a multibyte character in UTF-8 locales. Being more selective about +when to call mbrtowc() can lead to optimized string processing and script +speedups. This patch also handles the unlikely situation of a locale +encoding null wide characters with non-null bytes. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/lib/sh/strtrans.c Fri Oct 13 11:57:46 2023 +--- lib/sh/strtrans.c Mon Oct 27 14:30:35 2025 +*************** +*** 56,60 **** + unsigned long v; + size_t clen; +! int mb_cur_max; + #if defined (HANDLE_MULTIBYTE) + wchar_t wc; +--- 56,60 ---- + unsigned long v; + size_t clen; +! size_t mb_cur_max; + #if defined (HANDLE_MULTIBYTE) + wchar_t wc; +*************** +*** 64,68 **** + return ((char *)0); + +! mb_cur_max = MB_CUR_MAX; + #if defined (HANDLE_MULTIBYTE) + temp = 4*len + 4; +--- 64,68 ---- + return ((char *)0); + +! mb_cur_max = locale_mb_cur_max; + #if defined (HANDLE_MULTIBYTE) + temp = 4*len + 4; +*************** +*** 80,87 **** + clen = 1; + #if defined (HANDLE_MULTIBYTE) +! if ((locale_utf8locale && (c & 0x80)) || +! (locale_utf8locale == 0 && mb_cur_max > 0 && is_basic (c) == 0)) + { + clen = mbrtowc (&wc, s - 1, mb_cur_max, 0); + if (MB_INVALIDCH (clen)) + clen = 1; +--- 80,91 ---- + clen = 1; + #if defined (HANDLE_MULTIBYTE) +! /* We read an entire multibyte character at a time if we are in a +! locale where a backslash can possibly appear as part of a +! multibyte character. UTF-8 encodings prohibit this. */ +! if (locale_utf8locale == 0 && mb_cur_max > 1 && is_basic (c) == 0) + { + clen = mbrtowc (&wc, s - 1, mb_cur_max, 0); ++ if (MB_NULLWCH (clen)) ++ break; /* it apparently can happen */ + if (MB_INVALIDCH (clen)) + clen = 1; +*************** +*** 228,237 **** + char *r, *ret; + const char *s; +- size_t l, rsize; + unsigned char c; + size_t clen; + int b; +- #if defined (HANDLE_MULTIBYTE) + wchar_t wc; + #endif + +--- 232,241 ---- + char *r, *ret; + const char *s; + unsigned char c; ++ #if defined (HANDLE_MULTIBYTE) + size_t clen; + int b; + wchar_t wc; ++ DECLARE_MBSTATE; + #endif + +*************** +*** 239,245 **** + return ((char *)0); + +! l = strlen (str); +! rsize = 4 * l + 4; +! r = ret = (char *)xmalloc (rsize); + + *r++ = '$'; +--- 243,247 ---- + return ((char *)0); + +! r = ret = (char *)xmalloc (4 * strlen (str) + 4); + + *r++ = '$'; +*************** +*** 248,255 **** + for (s = str; c = *s; s++) + { +- b = 1; /* 1 == add backslash; 0 == no backslash */ +- l = 1; +- clen = 1; +- + switch (c) + { +--- 250,253 ---- +*************** +*** 267,303 **** + default: + #if defined (HANDLE_MULTIBYTE) +! b = is_basic (c); +! /* XXX - clen comparison to 0 is dicey */ +! if ((b == 0 && ((clen = mbrtowc (&wc, s, MB_CUR_MAX, 0)) < 0 || MB_INVALIDCH (clen) || iswprint (wc) == 0)) || +! (b == 1 && ISPRINT (c) == 0)) +! #else +! if (ISPRINT (c) == 0) +! #endif + { +! *r++ = '\\'; +! *r++ = TOCHAR ((c >> 6) & 07); +! *r++ = TOCHAR ((c >> 3) & 07); +! *r++ = TOCHAR (c & 07); +! continue; + } +! l = 0; +! break; +! } +! if (b == 0 && clen == 0) +! break; + +! if (l) +! *r++ = '\\'; +! +! if (clen == 1) +! *r++ = c; +! else +! { +! for (b = 0; b < (int)clen; b++) +! *r++ = (unsigned char)s[b]; +! s += clen - 1; /* -1 because of the increment above */ + } + } + + *r++ = '\''; + *r = '\0'; +--- 265,304 ---- + default: + #if defined (HANDLE_MULTIBYTE) +! if ((locale_utf8locale && (c & 0x80)) || +! (locale_utf8locale == 0 && locale_mb_cur_max > 1 && is_basic (c) == 0)) + { +! clen = mbrtowc (&wc, s, locale_mb_cur_max, &state); +! if (MB_NULLWCH (clen)) +! goto quote_end; +! if (MB_INVALIDCH (clen)) +! INITIALIZE_MBSTATE; +! else if (iswprint (wc)) +! { +! for (b = 0; b < (int)clen; b++) +! *r++ = (unsigned char)s[b]; +! s += clen - 1; /* -1 because of the increment above */ +! continue; +! } + } +! else +! #endif +! if (ISPRINT (c)) +! { +! *r++ = c; +! continue; +! } + +! *r++ = '\\'; +! *r++ = TOCHAR ((c >> 6) & 07); +! *r++ = TOCHAR ((c >> 3) & 07); +! *r++ = TOCHAR (c & 07); +! continue; + } ++ ++ *r++ = '\\'; ++ *r++ = c; + } + ++ quote_end: + *r++ = '\''; + *r = '\0'; +*************** +*** 349,353 **** + { + #if defined (HANDLE_MULTIBYTE) +! if (is_basic (c) == 0) + return (ansic_wshouldquote (s)); + #endif +--- 350,355 ---- + { + #if defined (HANDLE_MULTIBYTE) +! if ((locale_utf8locale && (c & 0x80)) || +! (locale_utf8locale == 0 && locale_mb_cur_max > 1 && is_basic (c) == 0)) + return (ansic_wshouldquote (s)); + #endif + +*** ../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 7 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 8 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-009 b/core/bash/bash53-009 new file mode 100644 index 0000000..4b53b41 --- /dev/null +++ b/core/bash/bash53-009 @@ -0,0 +1,82 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-009 + +Bug-Reported-by: penguin p <tgckpg@gmail.com> +Bug-Reference-ID: <TYYPR01MB14049C63D4635628EE867664BFA37A@TYYPR01MB14049.jpnprd01.prod.outlook.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00080.html + +Bug-Description: + +A SIGINT during a reverse i-search can cause a segmentation fault due to +accessing data freed by a signal handler. + +Patch (apply with `patch -p0'): + +*** ../bash-20250807/lib/readline/input.c Tue Jul 8 15:37:13 2025 +--- lib/readline/input.c Fri Aug 22 15:04:05 2025 +*************** +*** 976,984 **** + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); +! #if defined (READLINE_CALLBACKS) +! else if (osig == SIGINT && (ostate & RL_STATE_CALLBACK) && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG))) + /* just these cases for now */ + _rl_abort_internal (); +- #endif + } + } +--- 1004,1012 ---- + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); +! /* If the application's SIGINT handler returns, make sure we abort out of +! searches and numeric arguments because we've freed necessary state. */ +! if (osig == SIGINT && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG))) + /* just these cases for now */ + _rl_abort_internal (); + } + } +*** ../bash-20250807/lib/readline/isearch.c Thu Jun 5 09:22:11 2025 +--- lib/readline/isearch.c Tue Aug 19 14:55:55 2025 +*************** +*** 890,899 **** + _rl_isearch_cleanup (_rl_search_cxt *cxt, int r) + { + if (r >= 0) + _rl_isearch_fini (cxt); + _rl_scxt_dispose (cxt, 0); +- _rl_iscxt = 0; +- +- RL_UNSETSTATE(RL_STATE_ISEARCH); + + return (r != 0); +--- 890,901 ---- + _rl_isearch_cleanup (_rl_search_cxt *cxt, int r) + { ++ RL_UNSETSTATE(RL_STATE_ISEARCH); ++ if (cxt == 0) ++ return (r != 0); ++ ++ _rl_iscxt = 0; + if (r >= 0) + _rl_isearch_fini (cxt); + _rl_scxt_dispose (cxt, 0); + + return (r != 0); +*** ../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 8 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 9 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-010 b/core/bash/bash53-010 new file mode 100644 index 0000000..3797675 --- /dev/null +++ b/core/bash/bash53-010 @@ -0,0 +1,49 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-010 + +Bug-Reported-by: Aleksey Covacevice <aleksey.covacevice@gmail.com> +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-01/msg00003.html + +Bug-Description: + +Patch (apply with `patch -p0'): + +Under some circumstances, a subshell or asynchronous job with an active +EXIT trap that contains a call to `wait' can loop trying to wait for +processes that are not its children. It usually inherits these jobs from +its parent in the jobs list. + +*** ../bash-5.3-patched/jobs.c Fri Jul 25 08:53:22 2025 +--- jobs.c Fri Jan 9 10:21:03 2026 +*************** +*** 2840,2844 **** + ps->status = (r < 0 || r > 256) ? 127 : r; + } +! if (r == -1 && errno == ECHILD) + { + /* If we're mistaken about job state, compensate. */ +--- 2842,2846 ---- + ps->status = (r < 0 || r > 256) ? 127 : r; + } +! if ((r < 0 || r > 256) && errno == ECHILD) + { + /* If we're mistaken about job state, compensate. */ +*** ../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 9 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 10 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-011 b/core/bash/bash53-011 new file mode 100644 index 0000000..5aa8b92 --- /dev/null +++ b/core/bash/bash53-011 @@ -0,0 +1,70 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-011 + +Bug-Reported-by: Philippe Grégoire <git@pgregoire.xyz> +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +If a `mapfile' callback unsets the array variable `mapfile' is using to save +the lines it reads, `mapfile' can try to reference freed memory, which can +cause corruption or shell crashes. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/builtins/mapfile.def Mon May 6 11:58:48 2024 +--- builtins/mapfile.def Mon May 25 16:23:50 2026 +*************** +*** 154,160 **** + unbuffered_read = 0; + +! /* The following check should be done before reading any lines. Doing it +! here allows us to call bind_array_element instead of bind_array_variable +! and skip the variable lookup on every call. */ + entry = builtin_find_indexed_array (array_name, flags & MAPF_CLEARARRAY); + if (entry == 0) +--- 154,158 ---- + unbuffered_read = 0; + +! /* The following check should be done before reading any lines. */ + entry = builtin_find_indexed_array (array_name, flags & MAPF_CLEARARRAY); + if (entry == 0) +*************** +*** 202,207 **** + } + +! /* XXX - bad things can happen if the callback modifies ENTRY, e.g., +! unsetting it or changing it to a non-indexed-array type. */ + bind_array_element (entry, array_index, line, 0); + +--- 200,210 ---- + } + +! /* 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); + +*** ../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 10 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 11 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-012 b/core/bash/bash53-012 new file mode 100644 index 0000000..aac53bc --- /dev/null +++ b/core/bash/bash53-012 @@ -0,0 +1,80 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-012 + +Bug-Reported-by: earl_chew@yahoo.com +Bug-Reference-ID: +Bug-Reference-URL: https://savannah.gnu.org/bugs/?67745 + +Bug-Description: + +If a subshell with an inherited EXIT trap receives a fatal signal before +it clears the exit trap, and before it restores its original signal +handlers, it's possible for it to inappropriately run the inherited EXIT +trap. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/execute_cmd.c Thu Jun 5 11:02:01 2025 +--- execute_cmd.c Fri Jan 9 10:21:30 2026 +*************** +*** 1644,1648 **** + if (user_subshell) + { +! subshell_environment = SUBSHELL_PAREN; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; +--- 1681,1685 ---- + if (user_subshell) + { +! subshell_environment = SUBSHELL_PAREN|SUBSHELL_IGNTRAP; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; +*************** +*** 1650,1654 **** + else + { +! subshell_environment = 0; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; +--- 1687,1691 ---- + else + { +! subshell_environment = SUBSHELL_IGNTRAP; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; +*** ../bash-5.3-patched/sig.c Wed Dec 18 15:52:06 2024 +--- sig.c Fri Jan 9 10:21:43 2026 +*************** +*** 639,643 **** + comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; + +! run_exit_trap (); /* XXX - run exit trap possibly in signal context? */ + + kill_shell (sig); +--- 645,652 ---- + comsub_ignore_return = return_catch_flag = wait_intr_flag = 0; + +! /* Don't run the exit trap if we're supposed to be ignoring traps in a +! subshell environment. */ +! if ((subshell_environment & SUBSHELL_IGNTRAP) == 0) +! run_exit_trap (); /* XXX - run exit trap possibly in signal context? */ + + kill_shell (sig); +*** ../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 11 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 12 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-013 b/core/bash/bash53-013 new file mode 100644 index 0000000..16ff707 --- /dev/null +++ b/core/bash/bash53-013 @@ -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_ */ 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_ */ diff --git a/core/bash/bash53-015 b/core/bash/bash53-015 new file mode 100644 index 0000000..861b3ca --- /dev/null +++ b/core/bash/bash53-015 @@ -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_ */ diff --git a/core/bash/bash53-016 b/core/bash/bash53-016 new file mode 100644 index 0000000..6aff324 --- /dev/null +++ b/core/bash/bash53-016 @@ -0,0 +1,136 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-016 + +Bug-Reported-by: Ethan Pini <ethan@pini.dev> +Bug-Reference-ID: <sm8ZxfcmgU7_eiVLIsjNlax7oyAwwe1_uk2vaO0hp6nypbGnV7WStfE3rrHg_RV8BMSNRhhQmS2-7TpvzPxuK1NLLEWAyL9kbsZ2cA3nqIg=@pini.dev> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-06/msg00126.html + +Bug-Description: + +On recent versions of macOS, the pipe size is dynamic and changes due to +system-wide total pipe usage, so we have to check whether or not bash can +use the size determined at compile time. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/redir.c Fri Mar 7 18:49:37 2025 +--- redir.c Tue Jul 7 11:21:09 2026 +*************** +*** 473,477 **** +--- 473,500 ---- + #endif + ++ #if defined (PIPESIZE_DYNAMIC) ++ /* If we can't count on the pipe size determined at compile time to be ++ constant across systems, define PIPESIZE_DYNAMIC in configure.ac. ++ We set the pipe's write end to be non-blocking, try to write, and ++ fall back to a temp file on error. */ ++ if (sh_setnodelay (herepipe[1]) < 0) ++ { ++ close (herepipe[0]); ++ close (herepipe[1]); ++ goto use_tempfile; ++ } ++ #endif ++ + r = heredoc_write (herepipe[1], document, document_len); ++ ++ #if defined (PIPESIZE_DYNAMIC) ++ if (r == ENOSPC || r == EAGAIN) ++ { ++ close (herepipe[0]); ++ close (herepipe[1]); ++ goto use_tempfile; ++ } ++ #endif ++ + if (document != redirectee->word) + free (document); +*** ../bash-5.3-patched/general.c Wed Jun 25 15:54:35 2025 +--- general.c Tue Jul 7 11:12:10 2026 +*************** +*** 596,599 **** +--- 596,620 ---- + } + ++ int ++ sh_setnodelay (int fd) ++ { ++ int flags; ++ ++ if ((flags = fcntl (fd, F_GETFL, 0)) < 0) ++ return -1; ++ ++ /* This is defined to O_NDELAY in filecntl.h if O_NONBLOCK is not present ++ and O_NDELAY is defined. */ ++ #ifdef O_NONBLOCK ++ flags |= O_NONBLOCK; ++ #endif ++ ++ #ifdef O_NDELAY ++ flags |= O_NDELAY; ++ #endif ++ ++ return (fcntl (fd, F_SETFL, flags)); ++ } ++ + /* Just a wrapper for the define in include/filecntl.h */ + int +*** ../bash-5.3-patched/general.h Wed Jun 25 15:52:47 2025 +--- general.h Tue Jul 7 11:13:48 2026 +*************** +*** 318,321 **** +--- 318,322 ---- + + extern int sh_unset_nodelay_mode (int); ++ extern int sh_setnodelay (int); + extern int sh_setclexec (int); + extern int sh_validfd (int); +*** ../bash-5.3-patched/configure.ac Mon Jun 30 10:05:24 2025 +--- configure.ac Tue Jul 7 11:25:32 2026 +*************** +*** 1210,1214 **** + isc*) LOCAL_CFLAGS=-Disc386 ;; + rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; +! darwin*) LOCAL_CFLAGS=-DMACOSX ;; + sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; + sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; +--- 1210,1214 ---- + isc*) LOCAL_CFLAGS=-Disc386 ;; + rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; +! darwin*) LOCAL_CFLAGS="-DMACOSX -DPIPESIZE_DYNAMIC" ;; + sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; + sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; +*** ../bash-5.3-patched/configure Mon Jun 30 10:05:30 2025 +--- configure Tue Jul 7 11:25:36 2026 +*************** +*** 23134,23138 **** + isc*) LOCAL_CFLAGS=-Disc386 ;; + rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; +! darwin*) LOCAL_CFLAGS=-DMACOSX ;; + sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; + sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; +--- 23134,23138 ---- + isc*) LOCAL_CFLAGS=-Disc386 ;; + rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; +! darwin*) LOCAL_CFLAGS="-DMACOSX -DPIPESIZE_DYNAMIC" ;; + sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; + sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; +*** ../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 15 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 16 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-017 b/core/bash/bash53-017 new file mode 100644 index 0000000..6861796 --- /dev/null +++ b/core/bash/bash53-017 @@ -0,0 +1,62 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-017 + +Bug-Reported-by: Lennart Ackermans <lennart@ackermans.ch> +Bug-Reference-ID: <d6f36c30-633a-4e5e-8212-806db6441bf1@ackermans.ch> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-05/msg00066.html + +Bug-Description: + +If readline is invoked with the cursor somewhere other than column 0, and +the prompt contains multibyte characters, the display algorithm needs to +use a buffer offset, instead of the physical prompt length, to determine +whether or not to reprint the prompt from column 0 because the cursor is +before the last invisible character in the prompt string. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/lib/readline/display.c Thu Sep 4 11:55:37 2025 +--- lib/readline/display.c Fri May 22 14:55:01 2026 +*************** +*** 1498,1502 **** + only need to reprint it if the cursor is before the last + invisible character in the prompt string. */ +- /* XXX - why not use local_prompt_len? */ + nleft = prompt_visible_length + wrap_offset; + if (cursor_linenum == prompt_last_screen_line) +--- 1498,1501 ---- +*************** +*** 1510,1518 **** + buffer position, an index into curline + (local_prompt + pmt_offset) */ +! cursor_bufpos = pmt_offset; +! if (mb_cur_max == 1 || rl_byte_oriented) +! cursor_bufpos += _rl_last_c_pos; +! else +! cursor_bufpos += _rl_last_c_pos + curline_invchars; + + if (local_prompt && local_prompt_invis_chars[cursor_linenum] && +--- 1509,1513 ---- + buffer position, an index into curline + (local_prompt + pmt_offset) */ +! cursor_bufpos = pmt_offset + local_prompt_len; + + if (local_prompt && local_prompt_invis_chars[cursor_linenum] && +*** ../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 16 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 17 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-018 b/core/bash/bash53-018 new file mode 100644 index 0000000..070e60d --- /dev/null +++ b/core/bash/bash53-018 @@ -0,0 +1,71 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-018 + +Bug-Reported-by: Ben Kallus <benjamin.p.kallus.gr@dartmouth.edu> + Derek Schrock <dereks@lifeofadishwasher.com> +Bug-Reference-ID: <CAB6pCSaUPimkEbQwTTkxD5vV14ZJRGCeK2W1ur8RqT1rPrd+Gw@mail.gmail.com> + <ajC1pZAV_95J3vsJ@ircbsd.lifeofadishwasher.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2026-06/msg00005.html + https://lists.gnu.org/archive/html/bug-readline/2026-06/msg00002.html + +Bug-Description: + +Patch (apply with `patch -p0'): + +This patch fixes two problems with the redisplay code. The first is a +crash that results if the initial prompt contains more than 256 wrapped +lines. The second is a fix to the redisplay code when the first several +characters of the prompt string are identical, but the prompt has changed +and needs to be redrawn. If these first few characters are part of an escape +sequence, the entire sequence needs to be redrawn. + +*** ../bash-5.3-patched/lib/readline/display.c Fri May 22 14:55:01 2026 +--- lib/readline/display.c Fri Jun 26 11:08:53 2026 +*************** +*** 1025,1028 **** +--- 1025,1029 ---- + { + temp = local_prompt_newlines[newlines+1]; ++ CHECK_INV_LBREAKS (); + inv_lbreaks[++newlines] = temp; + } +*************** +*** 2262,2270 **** + nd = nfd - new; /* nd, od are buffer indexes */ + if (current_line == 0 && !_rl_horizontal_scroll_mode && +! _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 && + (((od > 0 || nd > 0) && (od <= prompt_last_invisible || nd <= prompt_last_invisible)) || + ((od >= lendiff) && _rl_last_c_pos < PROMPT_ENDING_INDEX))) + { +! _rl_cr (); + if (modmark) + _rl_output_some_chars ("*", 1); +--- 2266,2275 ---- + nd = nfd - new; /* nd, od are buffer indexes */ + if (current_line == 0 && !_rl_horizontal_scroll_mode && +! _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos >= 0 && + (((od > 0 || nd > 0) && (od <= prompt_last_invisible || nd <= prompt_last_invisible)) || + ((od >= lendiff) && _rl_last_c_pos < PROMPT_ENDING_INDEX))) + { +! if (_rl_last_c_pos > 0) +! _rl_cr (); + if (modmark) + _rl_output_some_chars ("*", 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 17 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 18 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-019 b/core/bash/bash53-019 new file mode 100644 index 0000000..e70e5e9 --- /dev/null +++ b/core/bash/bash53-019 @@ -0,0 +1,133 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-019 + +Bug-Reported-by: zheng <charname@qq.com> +Bug-Reference-ID: <tencent_19D6EE3366FEA3EF2C5FD6C23DF303156D09@qq.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-08/msg00010.html + +Bug-Description: + +On some systems, macOS in particular, isalpha(3) returns true for bytes +between 128 and 255. Bash uses this to determine whether or not these +characters are permitted to be part of a shell identifier, and can +consume one byte too many when determining the end of a variable name. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/syntax.h Mon Sep 14 10:20:05 2020 +--- syntax.h Thu Aug 6 14:11:25 2026 +*************** +*** 64,67 **** +--- 64,69 ---- + #define CSUBSTOP 0x1000 /* values of OP for ${word[:]OPstuff} */ + #define CBLANK 0x2000 /* whitespace (blank) character */ ++ #define CNAME 0x4000 /* POSIX name character ([_0-9a-zA-Z]) */ ++ #define CNAMESTART 0x8000 /* POSIX name start character ([_a-zA-Z]) */ + + /* Defines for use by the rest of the shell. */ +*** ../bash-5.3-patched/mksyntax.c Thu May 16 15:35:55 2024 +--- mksyntax.c Wed Aug 5 15:27:45 2026 +*************** +*** 61,64 **** +--- 61,66 ---- + { CSUBSTOP, "CSUBSTOP" }, + { CBLANK, "CBLANK" }, ++ { CNAME, "CNAME" }, ++ { CNAMESTART, "CNAMESTART" } + }; + +*************** +*** 199,202 **** +--- 201,243 ---- + } + ++ static void ++ setnamechars(void) ++ { ++ lsyntax['_'] |= CNAME|CNAMESTART; ++ ++ lsyntax['0'] |= CNAME; lsyntax['1'] |= CNAME; lsyntax['2'] |= CNAME; ++ lsyntax['3'] |= CNAME; lsyntax['4'] |= CNAME; lsyntax['5'] |= CNAME; ++ lsyntax['6'] |= CNAME; lsyntax['7'] |= CNAME; lsyntax['8'] |= CNAME; ++ lsyntax['9'] |= CNAME; ++ ++ lsyntax['a'] |= CNAME|CNAMESTART; lsyntax['b'] |= CNAME|CNAMESTART; ++ lsyntax['c'] |= CNAME|CNAMESTART; lsyntax['d'] |= CNAME|CNAMESTART; ++ lsyntax['e'] |= CNAME|CNAMESTART; lsyntax['f'] |= CNAME|CNAMESTART; ++ lsyntax['g'] |= CNAME|CNAMESTART; lsyntax['h'] |= CNAME|CNAMESTART; ++ lsyntax['i'] |= CNAME|CNAMESTART; lsyntax['j'] |= CNAME|CNAMESTART; ++ lsyntax['k'] |= CNAME|CNAMESTART; lsyntax['l'] |= CNAME|CNAMESTART; ++ lsyntax['m'] |= CNAME|CNAMESTART; lsyntax['n'] |= CNAME|CNAMESTART; ++ lsyntax['o'] |= CNAME|CNAMESTART; lsyntax['p'] |= CNAME|CNAMESTART; ++ lsyntax['q'] |= CNAME|CNAMESTART; lsyntax['r'] |= CNAME|CNAMESTART; ++ lsyntax['s'] |= CNAME|CNAMESTART; lsyntax['t'] |= CNAME|CNAMESTART; ++ lsyntax['u'] |= CNAME|CNAMESTART; lsyntax['v'] |= CNAME|CNAMESTART; ++ lsyntax['w'] |= CNAME|CNAMESTART; lsyntax['x'] |= CNAME|CNAMESTART; ++ lsyntax['y'] |= CNAME|CNAMESTART; lsyntax['z'] |= CNAME|CNAMESTART; ++ ++ lsyntax['A'] |= CNAME|CNAMESTART; lsyntax['B'] |= CNAME|CNAMESTART; ++ lsyntax['C'] |= CNAME|CNAMESTART; lsyntax['D'] |= CNAME|CNAMESTART; ++ lsyntax['E'] |= CNAME|CNAMESTART; lsyntax['F'] |= CNAME|CNAMESTART; ++ lsyntax['G'] |= CNAME|CNAMESTART; lsyntax['H'] |= CNAME|CNAMESTART; ++ lsyntax['I'] |= CNAME|CNAMESTART; lsyntax['J'] |= CNAME|CNAMESTART; ++ lsyntax['K'] |= CNAME|CNAMESTART; lsyntax['L'] |= CNAME|CNAMESTART; ++ lsyntax['M'] |= CNAME|CNAMESTART; lsyntax['N'] |= CNAME|CNAMESTART; ++ lsyntax['O'] |= CNAME|CNAMESTART; lsyntax['P'] |= CNAME|CNAMESTART; ++ lsyntax['Q'] |= CNAME|CNAMESTART; lsyntax['R'] |= CNAME|CNAMESTART; ++ lsyntax['S'] |= CNAME|CNAMESTART; lsyntax['T'] |= CNAME|CNAMESTART; ++ lsyntax['U'] |= CNAME|CNAMESTART; lsyntax['V'] |= CNAME|CNAMESTART; ++ lsyntax['W'] |= CNAME|CNAMESTART; lsyntax['X'] |= CNAME|CNAMESTART; ++ lsyntax['Y'] |= CNAME|CNAMESTART; lsyntax['Z'] |= CNAME|CNAMESTART; ++ } ++ + /* load up the correct flag values in lsyntax */ + static void +*************** +*** 235,238 **** +--- 276,281 ---- + + addblanks (); ++ ++ setnamechars (); + } + +*** ../bash-5.3-patched/general.h Tue Jul 7 11:13:48 2026 +--- general.h Thu Aug 6 14:07:22 2026 +*************** +*** 111,116 **** + + /* Define exactly what a legal shell identifier consists of. */ +! #define legal_variable_starter(c) (ISALPHA(c) || (c == '_')) +! #define legal_variable_char(c) (ISALNUM(c) || c == '_') + + /* Definitions used in subst.c and by the `read' builtin for field +--- 111,121 ---- + + /* Define exactly what a legal shell identifier consists of. */ +! #if 0 +! #define legal_variable_starter(c) (c < 128 && (ISALPHA(c) || c == '_')) +! #define legal_variable_char(c) (c < 128 && (ISALNUM(c) || c == '_')) +! #else +! #define legal_variable_starter(c) (sh_syntaxtab[c] & CNAMESTART) +! #define legal_variable_char(c) (sh_syntaxtab[c] & CNAME) +! #endif + + /* Definitions used in subst.c and by the `read' builtin for field +*** ../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 18 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 19 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/core/bash/bash53-020 b/core/bash/bash53-020 new file mode 100644 index 0000000..1e27d19 --- /dev/null +++ b/core/bash/bash53-020 @@ -0,0 +1,51 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-020 + +Bug-Reported-by: Félix Bouynot <felix.bouynot@setenforce.one> +Bug-Reference-ID: <39c9472ddcf23881693380c4b895dd3799b45cec.camel@setenforce.one> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-05/msg00065.html + +Bug-Description: + +If readline handles a SIGWINCH and resizes its idea of the screen +dimensions, it needs to recompute the columns where the prompt wraps +lines every time, not just when the screen width decreases. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/lib/readline/display.c Thu Sep 4 11:55:37 2025 +--- lib/readline/display.c Fri May 22 14:55:01 2026 +*************** +*** 3526,3531 **** + rl_crlf (); + +! if (_rl_screenwidth < prompt_visible_length) +! _rl_reset_prompt (); /* update local_prompt_newlines array */ + + /* Redraw only the last line of a multi-line prompt. */ +--- 3521,3527 ---- + rl_crlf (); + +! /* Let expand_prompt() update local_prompt_newlines and local_prompt_invis_chars +! arrays */ +! _rl_reset_prompt (); + + /* Redraw only the last line of a multi-line prompt. */ +*** ../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 19 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 20 + + #endif /* _PATCHLEVEL_H_ */ |
