summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoldstore <coldstore>2006-10-13 04:53:51 (GMT)
committercoldstore <coldstore>2006-10-13 04:53:51 (GMT)
commitb4a8d2a766c34971890c00827d75474e43c68c3d (patch)
treecabdc0d68cf1b3c797fad98871a4c52d5e5b26af
parent0ca2509a6a916f079e64160010f7490742df2256 (diff)
downloadtcl-b4a8d2a766c34971890c00827d75474e43c68c3d.zip
tcl-b4a8d2a766c34971890c00827d75474e43c68c3d.tar.gz
tcl-b4a8d2a766c34971890c00827d75474e43c68c3d.tar.bz2
win/tclWinFile.c: corrected erroneous attempt to protect against NULL return from Tcl_FSGetNormalizedPath per Bug 1548263 causing Bug 1575837.
-rw-r--r--win/tclWinFile.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 1e84315..41e1733 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.88 2006/10/01 21:30:04 patthoyts Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.89 2006/10/13 04:53:51 coldstore Exp $
*/
/* #define _WIN32_WINNT 0x0500 */
@@ -2486,13 +2486,17 @@ TclpObjLink(
int linkAction)
{
if (toPtr != NULL) {
- toPtr = Tcl_FSGetNormalizedPath(NULL, toPtr);
- }
- if (toPtr != NULL) {
int res;
- TCHAR *LinkTarget = (TCHAR *) Tcl_FSGetNativePath(toPtr);
+ TCHAR *LinkTarget;
TCHAR *LinkSource = (TCHAR *) Tcl_FSGetNativePath(pathPtr);
+ toPtr = Tcl_FSGetNormalizedPath(NULL, toPtr);
+ if (toPtr == NULL) {
+ return NULL;
+ }
+
+ LinkTarget = (TCHAR *) Tcl_FSGetNativePath(toPtr);
+
if (LinkSource == NULL || LinkTarget == NULL) {
return NULL;
}