diff options
author | das <das@noemail.net> | 2006-03-25 01:47:55 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2006-03-25 01:47:55 (GMT) |
commit | d0140d1afdb9b6dd5341b3d4b89d30ec70b65436 (patch) | |
tree | 53a58551c3b6da6325690f2d69b90e76c959772a | |
parent | 8c54ec8937a6f1c6bf798481e9e729eacdcadf7a (diff) | |
download | tcl-d0140d1afdb9b6dd5341b3d4b89d30ec70b65436.zip tcl-d0140d1afdb9b6dd5341b3d4b89d30ec70b65436.tar.gz tcl-d0140d1afdb9b6dd5341b3d4b89d30ec70b65436.tar.bz2 |
added check for NULL return value of Tcl_FSGetTranslatedPath(), coverity bug 39
FossilOrigin-Name: 826f64eb339d8e43d8a9cc3e1ecff69eb78a9454
-rw-r--r-- | unix/tclUnixFile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index c1092e9..2f2ebc4 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.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: tclUnixFile.c,v 1.48 2006/03/21 11:06:24 das Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.49 2006/03/25 01:47:56 das Exp $ */ #include "tclInt.h" @@ -1080,6 +1080,9 @@ TclNativeCreateNativeRep( */ validPathPtr = Tcl_FSGetTranslatedPath(NULL, pathPtr); + if (validPathPtr == NULL) { + return NULL; + } } else { /* * Make sure the normalized path is set. |