diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-08-31 08:50:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-08-31 08:50:23 (GMT) |
commit | ea6b35b21034a7ccfb568ab20f1c850b5619b8a7 (patch) | |
tree | dcdd00c2d8212b54cc23ac582b5240235882f34d /generic/tkEntry.c | |
parent | be848ca8401774a0242312db38ec6505dee6190a (diff) | |
download | tk-ea6b35b21034a7ccfb568ab20f1c850b5619b8a7.zip tk-ea6b35b21034a7ccfb568ab20f1c850b5619b8a7.tar.gz tk-ea6b35b21034a7ccfb568ab20f1c850b5619b8a7.tar.bz2 |
Fix use of XMaxTransChars in stead of TCL_UTF_MAX in some places. This should prevent possible buffer overflow when TCL_UTF_MAX=6
Micro-optimizations in tkEntry and ttkEntry
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index ea8d7f1..c0ce47b 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1943,7 +1943,8 @@ EntryComputeGeometry( entryPtr->displayString = p; for (i = entryPtr->numChars; --i >= 0; ) { - p += Tcl_UniCharToUtf(ch, p); + memcpy(p, buf, size); + p += size; } *p = '\0'; } |