summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-04-15 10:46:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-04-15 10:46:23 (GMT)
commitc4700cbf6d432d8c285b69987e663a40bfbdceeb (patch)
tree2e730303ac5a9123665101be96e596e006d88753 /unix
parente8b298cf5d716ff927b2b9b1b07b8eba2514b1ab (diff)
parent5d9aef7a4e951d7fb7242f892932a6b960bb95b7 (diff)
downloadtcl-c4700cbf6d432d8c285b69987e663a40bfbdceeb.zip
tcl-c4700cbf6d432d8c285b69987e663a40bfbdceeb.tar.gz
tcl-c4700cbf6d432d8c285b69987e663a40bfbdceeb.tar.bz2
merge trunk
Diffstat (limited to 'unix')
-rw-r--r--unix/tcl.pc.in8
-rw-r--r--unix/tclUnixFile.c6
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);