diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2006-09-25 21:55:05 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2006-09-25 21:55:05 (GMT) |
commit | a4b585aabbe3df7235ea562d0db03acb445d6ab8 (patch) | |
tree | 7b2a8880274b63a5c7d09795cc17eda2908aebdb /generic/tclIO.c | |
parent | 200eba735214d1ca29a0e34d4f00bc679cc7f448 (diff) | |
download | tcl-a4b585aabbe3df7235ea562d0db03acb445d6ab8.zip tcl-a4b585aabbe3df7235ea562d0db03acb445d6ab8.tar.gz tcl-a4b585aabbe3df7235ea562d0db03acb445d6ab8.tar.bz2 |
* generic/tclIO.c (Tcl_StackChannel): Fixed [SF Tcl Bug 1564642],
aka coverity #51. Extended loop condition, added checking for
NULL to prevent seg.fault.
FossilOrigin-Name: 82a33de1626129ff601526bb0655cad8fd75ad46
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 2eb96a7..407a88f 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.61.2.21 2006/07/10 23:01:06 hobbs Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.61.2.22 2006/09/25 21:55:06 andreas_kupries Exp $ */ #include "tclInt.h" @@ -1323,7 +1323,7 @@ Tcl_StackChannel(interp, typePtr, instanceData, mask, prevChan) statePtr = (ChannelState *) tsdPtr->firstCSPtr; prevChanPtr = ((Channel *) prevChan)->state->topChanPtr; - while (statePtr->topChanPtr != prevChanPtr) { + while ((statePtr != NULL) && (statePtr->topChanPtr != prevChanPtr)) { statePtr = statePtr->nextCSPtr; } |