summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Terbeck <ft@bewatermyfriend.org>2011-02-20 13:22:12 +0100
committerFrank Terbeck <ft@bewatermyfriend.org>2011-03-02 18:55:25 +0100
commit983b6365fcf672434eb1054896495f5c5a062ba6 (patch)
tree7055e1f9cdcf3f7c999ff9dec1c44495f4747048
parent6219ec1fe3bd18183030665947886f87b3fbbb87 (diff)
downloadzsh-983b6365fcf672434eb1054896495f5c5a062ba6.tar.gz
zsh-983b6365fcf672434eb1054896495f5c5a062ba6.zip
Adding patch to fix segfault with regular expression matching
See <http://www.zsh.org/mla/workers/2011/msg00020.html> and the following thread for details. Fix from: <http://www.zsh.org/mla/workers/2011/msg00027.html>.
-rw-r--r--debian/patches/0003-regex-match-crash-fix.diff43
-rw-r--r--debian/patches/series1
2 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/0003-regex-match-crash-fix.diff b/debian/patches/0003-regex-match-crash-fix.diff
new file mode 100644
index 000000000..d0aaa5aea
--- /dev/null
+++ b/debian/patches/0003-regex-match-crash-fix.diff
@@ -0,0 +1,43 @@
+Upstream fix. See:
+ <http://www.zsh.org/mla/workers/2011/msg00027.html>
+
+Index: pkg-zsh/Src/text.c
+===================================================================
+--- pkg-zsh.orig/Src/text.c 2011-02-20 13:20:25.000000000 +0100
++++ pkg-zsh/Src/text.c 2011-02-20 13:20:57.000000000 +0100
+@@ -785,8 +785,7 @@
+ taddstr(" ");
+ taddstr(ecgetstr(state, EC_NODUP, NULL));
+ if (ctype == COND_STREQ ||
+- ctype == COND_STRNEQ ||
+- ctype == COND_REGEX)
++ ctype == COND_STRNEQ)
+ state->pc++;
+ } else {
+ /* Unary test: `-f foo' etc. */
+Index: pkg-zsh/Test/C02cond.ztst
+===================================================================
+--- pkg-zsh.orig/Test/C02cond.ztst 2011-02-20 13:20:36.000000000 +0100
++++ pkg-zsh/Test/C02cond.ztst 2011-02-20 13:20:57.000000000 +0100
+@@ -306,6 +306,21 @@
+ 2:Error message for unknown infix condition
+ ?(eval):1: unknown condition: -fail
+
++ crashme() {
++ if [[ $1 =~ ^http:* ]]
++ then
++ url=${1#*=}
++ fi
++ }
++ which crashme
++0:Regression test for examining code with regular expression match
++>crashme () {
++> if [[ $1 =~ ^http:* ]]
++> then
++> url=${1#*=}
++> fi
++>}
++
+ %clean
+ # This works around a bug in rm -f in some versions of Cygwin
+ chmod 644 unmodish
diff --git a/debian/patches/series b/debian/patches/series
index eee860e06..66f2d48eb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
0000-compsys-fuser-fix.diff
0001-colors-with-ksharrays.diff
0002-vcs_info-svn-detection.diff
+0003-regex-match-crash-fix.diff