From e4c9131b83f5374f805d9316679e4b82c9e8ce78 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 19 Jul 2000 14:04:57 +0000 Subject: a bit of security for a VARARR() (12314) --- Src/Zle/compmatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/Zle/compmatch.c') 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; -- cgit 1.4.1