diff options
| author | dgp@users.sourceforge.net <dgp> | 2014-10-02 14:46:54 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2014-10-02 14:46:54 (GMT) |
| commit | 0f550b8833dc9a777bc2924f0efac01e3df7fa90 (patch) | |
| tree | 20a24e30d261d0bdfb0cea41eb93b3bf9d58a336 /generic/tclIO.c | |
| parent | 6c22c553d43156db2e98a5d1904c9001283bb2e7 (diff) | |
| parent | 2e21a4f16238ab49d90e7b8ff142b0455c441dc5 (diff) | |
| download | tcl-0f550b8833dc9a777bc2924f0efac01e3df7fa90.zip tcl-0f550b8833dc9a777bc2924f0efac01e3df7fa90.tar.gz tcl-0f550b8833dc9a777bc2924f0efac01e3df7fa90.tar.bz2 | |
[bc5b790099] Improper calculation of new dstLimit value. New test io-12.7.
Diffstat (limited to 'generic/tclIO.c')
| -rw-r--r-- | generic/tclIO.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index dcde8d1..aea633c 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -6046,12 +6046,11 @@ ReadChars( /* * We read more chars than allowed. Reset limits to * prevent that and try again. Don't forget the extra - * padding of TCL_UTF_MAX - 1 bytes demanded by the + * padding of TCL_UTF_MAX bytes demanded by the * Tcl_ExternalToUtf() call! */ - dstLimit = Tcl_UtfAtIndex(dst, charsToRead + 1) - + TCL_UTF_MAX - 1 - dst; + dstLimit = Tcl_UtfAtIndex(dst, charsToRead) + TCL_UTF_MAX - dst; statePtr->flags = savedFlags; statePtr->inputEncodingFlags = savedIEFlags; statePtr->inputEncodingState = savedState; |
