diff options
author | Clint Adams <clint@users.sourceforge.net> | 2008-09-10 15:56:00 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2008-09-10 15:56:00 +0000 |
commit | c543084471bf8f267c1ebf22c15e2e87a9a5d25d (patch) | |
tree | 2c91da3f1d568ddd2331abb39ebf29db968d9dfa /Src | |
parent | b4ee5adc251faffae472fb176214789327bf63b7 (diff) | |
download | zsh-c543084471bf8f267c1ebf22c15e2e87a9a5d25d.tar.gz zsh-c543084471bf8f267c1ebf22c15e2e87a9a5d25d.tar.xz zsh-c543084471bf8f267c1ebf22c15e2e87a9a5d25d.zip |
25637: dereference prog after the NULL check.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 3 |
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)) |