about summary refs log tree commit diff
path: root/Src/Modules/pcre.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-01-20 11:16:22 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-01-20 11:16:22 +0000
commitaf68ff74cd5e740d69020ad4ff20f1d5a8dcb4de (patch)
tree4b3232caa414d1717aca990dd7b3588b973ad372 /Src/Modules/pcre.c
parent1c71dfd735f34b2b3c7cf8abc3144e763fc96b60 (diff)
downloadzsh-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.c4
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;