diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-10-17 22:35:58 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-10-17 22:35:58 (GMT) |
commit | 391cc5529b10b842b5e34acb19bf559b56df7f49 (patch) | |
tree | 3b20f9da036fc4ea0a45e81d762efb0f84c787bb /generic/tclTrace.c | |
parent | 0d31e4cefc735abf4b5eb232c3b89effa9ebc3aa (diff) | |
download | tcl-391cc5529b10b842b5e34acb19bf559b56df7f49.zip tcl-391cc5529b10b842b5e34acb19bf559b56df7f49.tar.gz tcl-391cc5529b10b842b5e34acb19bf559b56df7f49.tar.bz2 |
Fix [Bug 2629338]: Stop evil unset traces from accessing freed memory.
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r-- | generic/tclTrace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c index bc6d289..346defc 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTrace.c,v 1.47.2.1 2008/10/08 14:52:39 dgp Exp $ + * RCS: @(#) $Id: tclTrace.c,v 1.47.2.2 2009/10/17 22:35:58 dkf Exp $ */ #include "tclInt.h" @@ -2894,6 +2894,7 @@ Tcl_UntraceVar2( } else { prevPtr->nextPtr = nextPtr; } + tracePtr->nextPtr = NULL; Tcl_EventuallyFree((ClientData) tracePtr, TCL_DYNAMIC); for (tracePtr = nextPtr; tracePtr != NULL; |