about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-12-11 22:21:26 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-12-11 22:21:26 +0000
commit512c62fc03c42835e1ff5c0f09a326d99768693f (patch)
tree5d4130d5ab015627e56ae92f90f6dbfffb504ae5 /Src
parented9f525f1be7755a5c6a91301581e9ecf4294e29 (diff)
downloadzsh-512c62fc03c42835e1ff5c0f09a326d99768693f.tar.gz
zsh-512c62fc03c42835e1ff5c0f09a326d99768693f.tar.xz
zsh-512c62fc03c42835e1ff5c0f09a326d99768693f.zip
27503: fix crash with hook functions
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c
index bb18eb859..4cb2ba70d 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1181,6 +1181,7 @@ callhookfunc(char *name, LinkList lnklst, int arrayp, int *retval)
 	memcpy(arrnam + namlen, HOOK_SUFFIX, HOOK_SUFFIX_LEN);
 
 	if ((arrptr = getaparam(arrnam))) {
+	    arrptr = arrdup(arrptr);
 	    for (; *arrptr; arrptr++) {
 		if ((shfunc = getshfunc(*arrptr))) {
 		    int newret = doshfunc(shfunc, lnklst, 1);