summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2018-05-28 13:13:39 (GMT)
committersebres <sebres@users.sourceforge.net>2018-05-28 13:13:39 (GMT)
commit6a4d06759ed9c9ac3c94860c9d7b17c076f28b7e (patch)
treee44015b05f3fc5eb75d36b47854e3c340b19e255
parent89a84af271178d64a75a68b44f8434452fcba03e (diff)
downloadtcl-6a4d06759ed9c9ac3c94860c9d7b17c076f28b7e.zip
tcl-6a4d06759ed9c9ac3c94860c9d7b17c076f28b7e.tar.gz
tcl-6a4d06759ed9c9ac3c94860c9d7b17c076f28b7e.tar.bz2
win: searching for FQDN in user-name should be utf-8 safe (user-name could contain non-ascii utf-8 chars)
-rwxr-xr-xwin/tclWinFile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 0bed39e..3655321 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1468,14 +1468,14 @@ TclpGetUserHome(
USER_INFO_1 *uiPtr;
Tcl_DString ds;
int nameLen, rc;
- char *domain;
+ const char *domain;
WCHAR *wName, *wHomeDir, *wDomain;
WCHAR buf[MAX_PATH];
rc = 0;
nameLen = -1;
wDomain = NULL;
- domain = strchr(name, '@');
+ domain = Tcl_UtfFindFirst(name, '@');
if (domain == NULL) {
const char *ptr;