diff options
author | andreas_kupries <akupries@shaw.ca> | 2008-11-23 19:26:08 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2008-11-23 19:26:08 (GMT) |
commit | d1b599fdf3dea45f15ac51111a2f2888e99da411 (patch) | |
tree | 03e5162f1e10d3c641ec241e5b77c424e1f1031c | |
parent | 51dbb45357db08773e07e3cbb9ace98dff372eaa (diff) | |
download | tcl-d1b599fdf3dea45f15ac51111a2f2888e99da411.zip tcl-d1b599fdf3dea45f15ac51111a2f2888e99da411.tar.gz tcl-d1b599fdf3dea45f15ac51111a2f2888e99da411.tar.bz2 |
* generic/tclIO.c: Backport of fix for [Bug 2333466].
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclIO.c | 6 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2008-08-23 Andreas Kupries <andreask@activestate.com> + + * generic/tclIO.c: Backport of fix for [Bug 2333466]. + 2008-11-04 Jeff Hobbs <jeffh@ActiveState.com> * generic/tclPort.h: remove the ../{win,unix}/ header dirs as the diff --git a/generic/tclIO.c b/generic/tclIO.c index 866d70a..b145d0f 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.29 2008/05/23 21:12:11 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.61.2.30 2008/11/23 19:26:09 andreas_kupries Exp $ */ #include "tclInt.h" @@ -9017,8 +9017,10 @@ Tcl_IsChannelExisting(chanName) name = statePtr->channelName; } + /* Bug 2333466. Include \0 in the compare to prevent partial matching on prefixes. + */ if ((*chanName == *name) && - (memcmp(name, chanName, (size_t) chanNameLen) == 0)) { + (memcmp(name, chanName, (size_t) chanNameLen+1) == 0)) { return 1; } } |