* PATCH: avoid use of variable after free in getmathfunc()
@ 2008-10-14 23:38 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2008-10-14 23:38 UTC (permalink / raw)
To: zsh-workers
removemathfunc frees p (but does not set it to NULL)
Index: Src/module.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/module.c,v
retrieving revision 1.39
diff -u -r1.39 module.c
--- Src/module.c 4 Aug 2008 15:26:32 -0000 1.39
+++ Src/module.c 14 Oct 2008 23:36:04 -0000
@@ -1266,10 +1266,11 @@
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-14 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-14 23:38 PATCH: avoid use of variable after free in getmathfunc() Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).