summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/utils.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 982c129bc..07cb62864 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-11  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 27503: Src/utils.c: fix crash when changing a hook
+	function inside a hook function of the same type.
+
 2009-12-10  Clint Adams  <clint@zsh.org>
 
 	* 27494: Completion/Debian/Command/_bug: reportbug --paranoid,
@@ -12462,5 +12467,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4837 $
+* $Revision: 1.4838 $
 *****************************************************
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);