From 93eec628d064ab07480feea7e4afc717d4f20f70 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 12 Oct 2005 22:05:45 +0000 Subject: Fix for [Bug 1325099] --- ChangeLog | 11 ++++++++--- generic/tclPathObj.c | 4 ++-- tests/fileName.test | 7 ++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd1f2f6..2149126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,18 @@ +2005-10-12 Donal K. Fellows + + * generic/tclPathObj.c (SetFsPathFromAny): TclGetString macro must + not be combined with post-increment arguments. [Bug 1325099] + 2005-10-12 Kevin Kenny * generic/tclExecute.c (Tcl_ExecuteByteCode, TclIncrObj): Several common cases inlined in hopes of gaining a little performance in [incr]. - + 2005-10-10 Miguel Sofer * generic/tclCompCmds.c: New convenience macro CompileTokens(). - + 2005-10-10 Don Porter * generic/tclExecute.c: Corrections to the NO_WIDE_TYPE build. Also @@ -15,7 +20,7 @@ 2005-10-10 Donal K. Fellows - * generic/tclInterp.c (DeleteScriptLimitCallback) + * generic/tclInterp.c (DeleteScriptLimitCallback) (SetScriptLimitCallback): Improve the interlocking between the script limit callback record and the hash table of current such records, to prevent crashes in callbacks that create callbacks. diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index f46854e..422aeae 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.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: tclPathObj.c,v 1.45 2005/08/09 11:02:36 dkf Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.46 2005/10/12 22:05:46 dkf Exp $ */ #include "tclInt.h" @@ -2329,7 +2329,7 @@ SetFsPathFromAny(interp, pathPtr) objc--; objv++; while (objc--) { - TclpNativeJoinPath(transPtr, TclGetString(*objv++)); + TclpNativeJoinPath(transPtr, Tcl_GetString(*objv++)); } TclDecrRefCount(parts); } else { diff --git a/tests/fileName.test b/tests/fileName.test index 979dd63..c2d870c 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -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: fileName.test,v 1.48 2005/07/28 18:42:32 dgp Exp $ +# RCS: @(#) $Id: fileName.test,v 1.49 2005/10/12 22:05:46 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1526,6 +1526,11 @@ test fileName-18.1 {windows - split ADS name correctly} {win} { list $x $y } {{c:/ ./c:d} c:/c:d} +test fileName-19.1 {ensure that [Bug 1325099] stays fixed} { + # Any non-crashing result is OK + list [file exists ~//.nonexistant_file] [file exists ~///.nonexistant_file] +} {0 0} + # cleanup catch {file delete -force C:/globTest} cd [temporaryDirectory] -- cgit v0.12