diff options
author | dgp <dgp@noemail.net> | 2009-08-18 14:43:57 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2009-08-18 14:43:57 (GMT) |
commit | a164c0685e9341f1a751b5450c245f829457f9e5 (patch) | |
tree | 642b85e0a955995f7d32ec5bcc8f7246392ce7d4 /generic/tclPathObj.c | |
parent | a2bffe98779aae3a1d4d1faa9b13e2e0f921aecf (diff) | |
download | tcl-a164c0685e9341f1a751b5450c245f829457f9e5.zip tcl-a164c0685e9341f1a751b5450c245f829457f9e5.tar.gz tcl-a164c0685e9341f1a751b5450c245f829457f9e5.tar.bz2 |
* generic/tclPathObj.c: Added NULL check to prevent crashes during
* tests/fileName.test: [glob]. [Bug 2837800]
FossilOrigin-Name: 6b2ad80bbe2992dfa588d63ef863232e9250b802
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index bb7b0f4..282b1fc 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.66.2.7 2009/03/27 19:16:49 dgp Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.66.2.8 2009/08/18 14:43:58 dgp Exp $ */ #include "tclInt.h" @@ -1165,6 +1165,7 @@ Tcl_FSConvertToPathType( return TCL_OK; } + if (pathPtr->bytes == NULL) { UpdateStringOfFsPath(pathPtr); } @@ -1680,8 +1681,13 @@ Tcl_FSGetTranslatedPath( * translated result we need, and can store it for future use. */ - Tcl_Obj *translatedCwdPtr = Tcl_FSGetTranslatedPath(interp, + Tcl_Obj *translatedCwdPtr; + + translatedCwdPtr = Tcl_FSGetTranslatedPath(interp, srcFsPathPtr->cwdPtr); + if (translatedCwdPtr == NULL) { + return NULL; + } retObj = Tcl_FSJoinToPath(translatedCwdPtr, 1, &(srcFsPathPtr->normPathPtr)); |