summaryrefslogtreecommitdiffstats
path: root/debian/patches/bash52-008.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-008.diff
parentAdding upstream version 5.2.15. (diff)
downloadbash-debian/5.2.15-2.tar.xz
bash-debian/5.2.15-2.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-008.diff')
-rw-r--r--debian/patches/bash52-008.diff47
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches/bash52-008.diff b/debian/patches/bash52-008.diff
new file mode 100644
index 0000000..6d5bb11
--- /dev/null
+++ b/debian/patches/bash52-008.diff
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-008
+
+Bug-Reported-by: Glenn Jackman <glenn.jackman@gmail.com>
+Bug-Reference-ID: <CAFC8ewQDx7hzNJzveuJ5o4FWo=ij7MzckiJVN_6NXjp504QZeg@mail.gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00095.html
+
+Bug-Description:
+
+Array subscript expansion can inappropriately quote brackets if the expression
+contains < or >.
+
+--- 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 7
++#define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
+--- a/subst.c
++++ b/subst.c
+@@ -3819,6 +3819,10 @@ pos_params (string, start, end, quoted,
+ #define EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
+ #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,
+ then call FUNC to expand STRING; otherwise just perform quote
+ removal if necessary. This returns a new string. */
+@@ -4028,7 +4032,7 @@ expand_arith_string (string, quoted)
+ i = saw_quote = 0;
+ while (string[i])
+ {
+- if (EXP_CHAR (string[i]))
++ if (ARITH_EXP_CHAR (string[i]))
+ break;
+ else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
+ saw_quote = string[i];