diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-08 11:48:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-08 11:48:42 +0400 |
commit | 597d7d4d9df6e688e766f1da1c7de92b191fbde9 (patch) | |
tree | e758dd00a56a9039deba2abab755033466bd0cbf /debian/patches/bash43-023.diff | |
download | bash-597d7d4d9df6e688e766f1da1c7de92b191fbde9.tar.gz |
Debian bash 4.3-11debian/4.3-11debian
Diffstat (limited to 'debian/patches/bash43-023.diff')
-rw-r--r-- | debian/patches/bash43-023.diff | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/debian/patches/bash43-023.diff b/debian/patches/bash43-023.diff new file mode 100644 index 0000000..20a9999 --- /dev/null +++ b/debian/patches/bash43-023.diff @@ -0,0 +1,86 @@ +# DP: bash43-023 upstream patch + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-023 + +Bug-Reported-by: Tim Friske <me@timfriske.com> +Bug-Reference-ID: <CAM1RzOcOR9zzC2i+aeES6LtbHNHoOV+0pZEYPrqxv_QAii-RXA@mail.gmail.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00056.html + +Bug-Description: + +Bash does not correctly parse process substitution constructs that contain +unbalanced parentheses as part of the contained command. + +Patch (apply with `patch -p0'): + +Index: b/subst.h +=================================================================== +--- a/subst.h ++++ b/subst.h +@@ -82,7 +82,7 @@ extern char *extract_arithmetic_subst __ + /* Extract the <( or >( construct in STRING, and return a new string. + Start extracting at (SINDEX) as if we had just seen "<(". + Make (SINDEX) get the position just after the matching ")". */ +-extern char *extract_process_subst __P((char *, char *, int *)); ++extern char *extract_process_subst __P((char *, char *, int *, int)); + #endif /* PROCESS_SUBSTITUTION */ + + /* Extract the name of the variable to bind to from the assignment string. */ +Index: b/subst.c +=================================================================== +--- a/subst.c ++++ b/subst.c +@@ -1192,12 +1192,18 @@ extract_arithmetic_subst (string, sindex + Start extracting at (SINDEX) as if we had just seen "<(". + Make (SINDEX) get the position of the matching ")". */ /*))*/ + char * +-extract_process_subst (string, starter, sindex) ++extract_process_subst (string, starter, sindex, xflags) + char *string; + char *starter; + int *sindex; ++ int xflags; + { ++#if 0 + return (extract_delimited_string (string, sindex, starter, "(", ")", SX_COMMAND)); ++#else ++ xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0); ++ return (xparse_dolparen (string, string+*sindex, sindex, xflags)); ++#endif + } + #endif /* PROCESS_SUBSTITUTION */ + +@@ -1785,7 +1791,7 @@ skip_to_delim (string, start, delims, fl + si = i + 2; + if (string[si] == '\0') + CQ_RETURN(si); +- temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si); ++ temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si, 0); + free (temp); /* no SX_ALLOC here */ + i = si; + if (string[i] == '\0') +@@ -8249,7 +8255,7 @@ add_string: + else + t_index = sindex + 1; /* skip past both '<' and LPAREN */ + +- temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index); /*))*/ ++ temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index, 0); /*))*/ + sindex = t_index; + + /* If the process substitution specification is `<()', we want to +Index: b/patchlevel.h +=================================================================== +--- 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 22 ++#define PATCHLEVEL 23 + + #endif /* _PATCHLEVEL_H_ */ |