summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-12-12 16:47:47 (GMT)
committervincentdarley <vincentdarley>2003-12-12 16:47:47 (GMT)
commita66b2e3e357d9ae474819710a99a0a12afbf3a79 (patch)
treea72033fee9946e8fc215643b57a882208212adc3
parentfbbfaea5fca1f1d6c39d4d126ffae9d71f4eb8e6 (diff)
downloadtcl-a66b2e3e357d9ae474819710a99a0a12afbf3a79.zip
tcl-a66b2e3e357d9ae474819710a99a0a12afbf3a79.tar.gz
tcl-a66b2e3e357d9ae474819710a99a0a12afbf3a79.tar.bz2
fix to 'file normalize ~nobody' crash
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCmdAH.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e99530..b3800ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-12 Vince Darley <vincentdarley@users.sourceforge.net>
+
+ * generic/tclCmdAH.c: fix to normalization of non-existent user
+ name ('file normalize ~nobody') [Bug 858937]
+
2003-12-09 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* unix/tclUnixPort.h: #ifdef'd out declarations of errno which
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 8f4ec9b..4bb76d2 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.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: tclCmdAH.c,v 1.27.2.7 2003/10/22 08:21:15 dkf Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.27.2.8 2003/12/12 16:47:47 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -1132,6 +1132,9 @@ Tcl_FileObjCmd(dummy, interp, objc, objv)
}
fileName = Tcl_FSGetNormalizedPath(interp, objv[2]);
+ if (fileName == NULL) {
+ return TCL_ERROR;
+ }
Tcl_SetObjResult(interp, fileName);
return TCL_OK;
}