diff options
| -rw-r--r-- | generic/tclEncoding.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index d0f04a7..42fcb7f 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -3448,6 +3448,14 @@ TableToUtfProc( src++; } + if (src > srcEnd) { + /* + * This can happen in the case of a trailing truncated byte sequence + * where src is incremented past the prefix byte which is the last. + * See bug [5be203d6ca] + */ + src--; + } *srcReadPtr = src - srcStart; *dstWrotePtr = dst - dstStart; *dstCharsPtr = numChars; |
