summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-08-30 17:48:48 (GMT)
committerhobbs <hobbs>2006-08-30 17:48:48 (GMT)
commit8f481c22e737471e3dc5211eec9d4296f8f7da9f (patch)
tree14aba76b3795594b8283cd1dfab48c4a53f8048a /win
parent0fbcd16e10654644e7054dfb05b7953c1cb34d34 (diff)
downloadtcl-8f481c22e737471e3dc5211eec9d4296f8f7da9f.zip
tcl-8f481c22e737471e3dc5211eec9d4296f8f7da9f.tar.gz
tcl-8f481c22e737471e3dc5211eec9d4296f8f7da9f.tar.bz2
* win/tclWinFCmd.c: [Bug 1548263] Added test for NULL return
* generic/tclIOUtil.c: from Tcl_FSGetNormalizedPath which was causing segv's
Diffstat (limited to 'win')
-rw-r--r--win/tclWinFCmd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index b8d1564..a6b0dcb 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFCmd.c,v 1.35.2.4 2005/06/23 15:05:22 kennykb Exp $
+ * RCS: @(#) $Id: tclWinFCmd.c,v 1.35.2.5 2006/08/30 17:48:48 hobbs Exp $
*/
#include "tclWinInt.h"
@@ -902,8 +902,14 @@ TclpObjCopyDirectory(srcPathPtr, destPathPtr, errorPtr)
int ret;
normSrcPtr = Tcl_FSGetNormalizedPath(NULL,srcPathPtr);
+ if (normSrcPtr == NULL) {
+ return TCL_ERROR;
+ }
Tcl_WinUtfToTChar(Tcl_GetString(normSrcPtr), -1, &srcString);
normDestPtr = Tcl_FSGetNormalizedPath(NULL,destPathPtr);
+ if (normDestPtr == NULL) {
+ return TCL_ERROR;
+ }
Tcl_WinUtfToTChar(Tcl_GetString(normDestPtr), -1, &dstString);
ret = TraverseWinTree(TraversalCopy, &srcString, &dstString, &ds);
@@ -971,6 +977,9 @@ TclpObjRemoveDirectory(pathPtr, recursive, errorPtr)
*/
Tcl_DString native;
normPtr = Tcl_FSGetNormalizedPath(NULL, pathPtr);
+ if (normPtr == NULL) {
+ return TCL_ERROR;
+ }
Tcl_WinUtfToTChar(Tcl_GetString(normPtr), -1, &native);
ret = DoRemoveDirectory(&native, recursive, &ds);
Tcl_DStringFree(&native);