mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
25637: dereference prog after the NULL check.
This commit is contained in:
parent
b4ee5adc25
commit
c543084471
2 changed files with 6 additions and 1 deletions
|
@ -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>
|
2008-09-08 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 25636: Src/Zle/zle_tricky.c: free s before returning with an
|
* 25636: Src/Zle/zle_tricky.c: free s before returning with an
|
||||||
|
|
|
@ -4483,11 +4483,12 @@ getfpfunc(char *s, int *ksh, char **fname)
|
||||||
Eprog
|
Eprog
|
||||||
stripkshdef(Eprog prog, char *name)
|
stripkshdef(Eprog prog, char *name)
|
||||||
{
|
{
|
||||||
Wordcode pc = prog->prog;
|
Wordcode pc;
|
||||||
wordcode code;
|
wordcode code;
|
||||||
|
|
||||||
if (!prog)
|
if (!prog)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
pc = prog->prog;
|
||||||
code = *pc++;
|
code = *pc++;
|
||||||
if (wc_code(code) != WC_LIST ||
|
if (wc_code(code) != WC_LIST ||
|
||||||
(WC_LIST_TYPE(code) & (Z_SYNC|Z_END|Z_SIMPLE)) != (Z_SYNC|Z_END|Z_SIMPLE))
|
(WC_LIST_TYPE(code) & (Z_SYNC|Z_END|Z_SIMPLE)) != (Z_SYNC|Z_END|Z_SIMPLE))
|
||||||
|
|
Loading…
Reference in a new issue