summaryrefslogtreecommitdiffstats
path: root/debian/patches/bash52-013.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:38:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:38:57 +0000
commitb0a54c0318f73e8824c1299900286d1d7dcade3a (patch)
tree40130abdf474665f42bf01fab6e42ab4a7e1e1c5 /debian/patches/bash52-013.diff
parentAdding upstream version 5.2.15. (diff)
downloadbash-debian.tar.xz
bash-debian.zip
Adding debian version 5.2.15-2.debian/5.2.15-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/bash52-013.diff')
-rw-r--r--debian/patches/bash52-013.diff47
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches/bash52-013.diff b/debian/patches/bash52-013.diff
new file mode 100644
index 0000000..301bce7
--- /dev/null
+++ b/debian/patches/bash52-013.diff
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-013
+
+Bug-Reported-by: Ralf Oehler <Ralf@Oehler-Privat.de>
+Bug-Reference-ID: <20221120140252.2fc6489b@bilbo>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00082.html
+
+Bug-Description:
+
+Bash can leak memory when referencing a non-existent associative array
+element.
+
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 12
++#define PATCHLEVEL 13
+
+ #endif /* _PATCHLEVEL_H_ */
+--- a/subst.c
++++ b/subst.c
+@@ -7497,8 +7497,6 @@ expand_arrayref:
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ rflags |= W_ARRAYIND;
+- if (estatep)
+- *estatep = es; /* structure copy */
+ }
+ /* Note that array[*] and array[@] expanded to a quoted null string by
+ returning the W_HASQUOTEDNULL flag to the caller in addition to TEMP. */
+@@ -7507,7 +7505,9 @@ expand_arrayref:
+ else if (es.subtype == 2 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ rflags |= W_HASQUOTEDNULL;
+
+- if (estatep == 0)
++ if (estatep)
++ *estatep = es; /* structure copy */
++ else
+ flush_eltstate (&es);
+ }
+ #endif