summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/exec.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f351250e..976013bda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-10 Clint Adams <clint@zsh.org>
+
+ * 25637: Src/exec.c: dereference prog after the NULL check.
+
2008-09-08 Clint Adams <clint@zsh.org>
* 25636: Src/Zle/zle_tricky.c: free s before returning with an
diff --git a/Src/exec.c b/Src/exec.c
index e638b9f6e..a78212888 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4483,11 +4483,12 @@ getfpfunc(char *s, int *ksh, char **fname)
Eprog
stripkshdef(Eprog prog, char *name)
{
- Wordcode pc = prog->prog;
+ Wordcode pc;
wordcode code;
if (!prog)
return NULL;
+ pc = prog->prog;
code = *pc++;
if (wc_code(code) != WC_LIST ||
(WC_LIST_TYPE(code) & (Z_SYNC|Z_END|Z_SIMPLE)) != (Z_SYNC|Z_END|Z_SIMPLE))