about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/Zle/compmatch.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d1cdd01a..98804a6ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-07-19  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 12314: Src/Zle/compmatch.c: a bit of security for a VARARR()
+	
 2000-07-19  Peter Stephenson  <pws@cambridgesiliconradio.com>
 
 	* 12313: Doc/Zsh/metafaq.yo: bad phrasing corrected.
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index aa7890407..3cb0ea12f 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -442,7 +442,7 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp,
 {
     int ll = strlen(l), lw = strlen(w), oll = ll, olw = lw;
     int il = 0, iw = 0, t, ind, add, he = 0, bpc, obc = bc, bslash;
-    VARARR(unsigned char, ea, ll + 1);
+    VARARR(unsigned char, ea, (ll > lw ? ll : lw) + 1);
     char *ow;
     Cmlist ms;
     Cmatcher mp, lm = NULL;