diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-15 10:46:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-15 10:46:23 (GMT) |
commit | 13aaf9c46acb147461bc3f09089c575d4af087d0 (patch) | |
tree | 2e730303ac5a9123665101be96e596e006d88753 /unix | |
parent | b548441f399cf039b31e3f120b693ec61e574e7f (diff) | |
parent | 363b6911107557283c7fec07e041e14c7af7eee3 (diff) | |
download | tcl-13aaf9c46acb147461bc3f09089c575d4af087d0.zip tcl-13aaf9c46acb147461bc3f09089c575d4af087d0.tar.gz tcl-13aaf9c46acb147461bc3f09089c575d4af087d0.tar.bz2 |
merge trunk
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tcl.pc.in | 8 | ||||
-rw-r--r-- | unix/tclUnixFile.c | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/unix/tcl.pc.in b/unix/tcl.pc.in index 6b6fe44..846cb11 100644 --- a/unix/tcl.pc.in +++ b/unix/tcl.pc.in @@ -8,8 +8,8 @@ includedir=@includedir@ Name: Tool Command Language Description: Tcl is a powerful, easy-to-learn dynamic programming language, suitable for a wide range of uses. URL: http://www.tcl.tk/ -Version: @TCL_VERSION@ -Requires: -Conflicts: -Libs: -L${libdir} @TCL_LIB_FLAG@ @TCL_LIBS@ +Version: @TCL_VERSION@@TCL_PATCH_LEVEL@ +Requires.private: zlib >= 1.2.3 +Libs: -L${libdir} @TCL_LIB_FLAG@ @TCL_STUB_LIB_FLAG@ +Libs.private: @TCL_LIBS@ Cflags: -I${includedir} diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index 5bfe5d9..2cb0027 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -1105,6 +1105,12 @@ TclNativeCreateNativeRep( str = Tcl_GetStringFromObj(validPathPtr, &len); Tcl_UtfToExternalDString(NULL, str, len, &ds); len = Tcl_DStringLength(&ds) + sizeof(char); + if (strlen(Tcl_DStringValue(&ds)) < len - sizeof(char)) { + /* See bug [3118489]: NUL in filenames */ + Tcl_DecrRefCount(validPathPtr); + Tcl_DStringFree(&ds); + return NULL; + } Tcl_DecrRefCount(validPathPtr); nativePathPtr = ckalloc(len); memcpy(nativePathPtr, Tcl_DStringValue(&ds), (size_t) len); |