about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compmatch.c2
1 files changed, 1 insertions, 1 deletions
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;