diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-19 14:04:57 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-19 14:04:57 +0000 |
commit | e4c9131b83f5374f805d9316679e4b82c9e8ce78 (patch) | |
tree | 4022c13b93c9cde064b897961203f09648e8c98a /Src/Zle/compmatch.c | |
parent | c4e03794081621b260d9a5dbd80d7240d4788d3f (diff) | |
download | zsh-e4c9131b83f5374f805d9316679e4b82c9e8ce78.tar.gz zsh-e4c9131b83f5374f805d9316679e4b82c9e8ce78.tar.xz zsh-e4c9131b83f5374f805d9316679e4b82c9e8ce78.zip |
a bit of security for a VARARR() (12314)
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r-- | Src/Zle/compmatch.c | 2 |
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; |