diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-01-20 11:16:22 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-01-20 11:16:22 +0000 |
commit | af68ff74cd5e740d69020ad4ff20f1d5a8dcb4de (patch) | |
tree | 4b3232caa414d1717aca990dd7b3588b973ad372 /Src/Modules/pcre.c | |
parent | 1c71dfd735f34b2b3c7cf8abc3144e763fc96b60 (diff) | |
download | zsh-af68ff74cd5e740d69020ad4ff20f1d5a8dcb4de.tar.gz zsh-af68ff74cd5e740d69020ad4ff20f1d5a8dcb4de.tar.xz zsh-af68ff74cd5e740d69020ad4ff20f1d5a8dcb4de.zip |
27608: fix memory for mbegin, mend & regexp test
Diffstat (limited to 'Src/Modules/pcre.c')
-rw-r--r-- | Src/Modules/pcre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c index f8b79adea..e1a897944 100644 --- a/Src/Modules/pcre.c +++ b/Src/Modules/pcre.c @@ -194,8 +194,8 @@ zpcre_get_substrings(char *arg, int *ovec, int ret, char *matchvar, char **mbegin, **mend, **bptr, **eptr; int i, *ipair; - bptr = mbegin = zalloc(nelem+1); - eptr = mend = zalloc(nelem+1); + bptr = mbegin = zalloc(sizeof(char*)*(nelem+1)); + eptr = mend = zalloc(sizeof(char*)*(nelem+1)); for (ipair = ovec + 2, i = 0; i < nelem; |