summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-10-27 20:31:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-10-27 20:31:08 (GMT)
commit667646d2977ff01762169575231252c9e9988ee8 (patch)
treee86f1ae3c04e048317655554218936d03c2b20ab
parent097f32ff2cb5272d1ce612b32486caf8feaee9e5 (diff)
downloadtcl-667646d2977ff01762169575231252c9e9988ee8.zip
tcl-667646d2977ff01762169575231252c9e9988ee8.tar.gz
tcl-667646d2977ff01762169575231252c9e9988ee8.tar.bz2
* generic/tclPathObj.c: Missing refcount on cached normalized path
caused crashes. [Bug 2884203].
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclPathObj.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 59ff2fd..5d67ecd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-27 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclPathObj.c: Missing refcount on cached normalized path
+ caused crashes. [Bug 2884203].
+
2009-10-27 Kevin B. Kenny <kennykb@acm.org>
* library/clock.tcl (ParseClockScanFormat):
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 7599529..6d36fe4 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.83 2009/09/30 03:11:26 dgp Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.84 2009/10/27 20:31:08 dgp Exp $
*/
#include "tclInt.h"
@@ -1940,6 +1940,7 @@ Tcl_FSGetNormalizedPath(
TclFSNormalizeToUniquePath(interp, copy, cwdLen-1,
(fsPathPtr->nativePathPtr == NULL ? &clientData : NULL));
fsPathPtr->normPathPtr = copy;
+ Tcl_IncrRefCount(fsPathPtr->normPathPtr);
if (clientData != NULL) {
fsPathPtr->nativePathPtr = clientData;
}