summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-08-30 13:07:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-08-30 13:07:10 (GMT)
commit5b7e79f851f3ec2a106bc7520161e934b75ea3b7 (patch)
tree4c13a17c50a6283243312fe0ed36e17d16d4dfc9 /win/tclWinFile.c
parent0cce018c67cb5200e8d82476ae2540d398a5d9d3 (diff)
parent3b2cb79ab18e9506dfb66e2786a7ee04dd30a780 (diff)
downloadtcl-5b7e79f851f3ec2a106bc7520161e934b75ea3b7.zip
tcl-5b7e79f851f3ec2a106bc7520161e934b75ea3b7.tar.gz
tcl-5b7e79f851f3ec2a106bc7520161e934b75ea3b7.tar.bz2
Don't ever allow UTF-8 sequences of more than 4 characters to be generated or parsed, even when TCL_UTF_MAX>4: According to current Unicode standard, a byte string of >4 characters can never form a single UTF-8 character.
And a few minor micro-optimizations related to UTF-8 handling.
Diffstat (limited to 'win/tclWinFile.c')
-rwxr-xr-xwin/tclWinFile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 3a856a1..9458933 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -3166,8 +3166,8 @@ TclWinFileOwned(
case we are in all likelihood not the owner */
return 0;
}
-
- /*
+
+ /*
* Getting the current process SID is a multi-step process.
* We make the assumption that if a call fails, this process is
* so underprivileged it could not possibly own anything. Normally
@@ -3191,10 +3191,10 @@ TclWinFileOwned(
LocalFree(secd); /* Also frees ownerSid */
if (buf)
ckfree(buf);
-
+
return (owned != 0); /* Convert non-0 to 1 */
}
-
+
/*
* Local Variables:
* mode: c