summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-09-10 15:56:00 +0000
committerClint Adams <clint@users.sourceforge.net>2008-09-10 15:56:00 +0000
commitc543084471bf8f267c1ebf22c15e2e87a9a5d25d (patch)
tree2c91da3f1d568ddd2331abb39ebf29db968d9dfa /Src/exec.c
parentb4ee5adc251faffae472fb176214789327bf63b7 (diff)
downloadzsh-c543084471bf8f267c1ebf22c15e2e87a9a5d25d.tar.gz
zsh-c543084471bf8f267c1ebf22c15e2e87a9a5d25d.zip
25637: dereference prog after the NULL check.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c3
1 files changed, 2 insertions, 1 deletions
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))