summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEncoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 1842fb6..54a49aa 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -2283,7 +2283,7 @@ UtfToUtfProc(
*dst++ = *src++;
} else if (pureNullMode == 1 && UCHAR(*src) == 0xc0 &&
- UCHAR(*(src+1)) == 0x80) {
+ (src + 1 < srcEnd) && UCHAR(*(src+1)) == 0x80) {
/*
* Convert 0xc080 to real nulls when we are in output mode.
*/