summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-08-18 14:43:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-08-18 14:43:58 (GMT)
commit2fcbc1a3742e8947645f3165956792424d64c635 (patch)
tree642b85e0a955995f7d32ec5bcc8f7246392ce7d4 /generic/tclPathObj.c
parent9b60842d16319877dbd4d5690699e7f17908392b (diff)
downloadtcl-2fcbc1a3742e8947645f3165956792424d64c635.zip
tcl-2fcbc1a3742e8947645f3165956792424d64c635.tar.gz
tcl-2fcbc1a3742e8947645f3165956792424d64c635.tar.bz2
* generic/tclPathObj.c: Added NULL check to prevent crashes during
* tests/fileName.test: [glob]. [Bug 2837800]
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c10
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));