summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-23 13:03:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-23 13:03:28 (GMT)
commit4723df2a35ce7e7a2d460213d01c361be26a1772 (patch)
treea2730203d5c9c697bc44c7b13c2959fd3466a250 /unix
parent8242d1a544d685846fe49557be8c9fd628d42329 (diff)
parentc0f6db4b8165a139a30bd801ca3d8ffb56210940 (diff)
downloadtcl-4723df2a35ce7e7a2d460213d01c361be26a1772.zip
tcl-4723df2a35ce7e7a2d460213d01c361be26a1772.tar.gz
tcl-4723df2a35ce7e7a2d460213d01c361be26a1772.tar.bz2
Merge 8.5
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixFile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 35046a5..2023789 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -43,9 +43,9 @@ TclpFindExecutable(
#ifdef __CYGWIN__
int length;
char buf[PATH_MAX * 2];
- char name[PATH_MAX * TCL_UTF_MAX + 1];
- GetModuleFileNameW(NULL, buf, PATH_MAX);
- cygwin_conv_path(3, buf, name, PATH_MAX);
+ char name[PATH_MAX * 3 + 1];
+ GetModuleFileNameW(NULL, buf, sizeof(buf)/2);
+ cygwin_conv_path(3, buf, name, sizeof(name));
length = strlen(name);
if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) {
/* Strip '.exe' part. */