diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/module.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index b8b6f40fc..4912e14d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-10-14 Clint Adams <clint@zsh.org> + * 25898: Src/module.c: avoid dereference of p after it is freed + in getmathfunc. + * 25897: Src/Zle/computil.c: remove small bit of dead code in cfp_opt_pats. diff --git a/Src/module.c b/Src/module.c index d507d8202..8e5586e6d 100644 --- a/Src/module.c +++ b/Src/module.c @@ -1266,10 +1266,11 @@ getmathfunc(const char *name, int autol) if (!strcmp(name, p->name)) { if (autol && p->module && !(p->flags & MFF_USERFUNC)) { char *n = dupstring(p->module); + int flags = p->flags; removemathfunc(q, p); - (void)ensurefeature(n, "f:", (p->flags & MFF_AUTOALL) ? NULL : + (void)ensurefeature(n, "f:", (flags & MFF_AUTOALL) ? NULL : name); return getmathfunc(name, 0); |