summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorcoldstore <coldstore@noemail.net>2006-10-13 04:53:51 (GMT)
committercoldstore <coldstore@noemail.net>2006-10-13 04:53:51 (GMT)
commit4f92d1fe9cea5a28bc0d3d83cf51dd18960d9868 (patch)
treecabdc0d68cf1b3c797fad98871a4c52d5e5b26af /win
parent4447253a5f8a14f616cf310d53773d5f1409c6f0 (diff)
downloadtcl-4f92d1fe9cea5a28bc0d3d83cf51dd18960d9868.zip
tcl-4f92d1fe9cea5a28bc0d3d83cf51dd18960d9868.tar.gz
tcl-4f92d1fe9cea5a28bc0d3d83cf51dd18960d9868.tar.bz2
win/tclWinFile.c: corrected erroneous attempt to protect against NULL return from Tcl_FSGetNormalizedPath per Bug 1548263 causing Bug 1575837.
FossilOrigin-Name: 22fefe911443564e371f4d495b1ffb91b1941ac1
Diffstat (limited to 'win')
-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;
}