diff options
author | dgp <dgp@users.sourceforge.net> | 2015-04-24 15:48:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-04-24 15:48:56 (GMT) |
commit | d5453f4a90c64ff9ea80c89e8e7c4b51e7f26d16 (patch) | |
tree | 4039637916184060e9eec1a5154695b3d4ed5a64 /generic | |
parent | ddd3275d7c30ea02bdff86cd55edc4f7c9e7babc (diff) | |
parent | 9c7addd0fee93ed5ccdf1faeccf7994924e2d6ca (diff) | |
download | tcl-d5453f4a90c64ff9ea80c89e8e7c4b51e7f26d16.zip tcl-d5453f4a90c64ff9ea80c89e8e7c4b51e7f26d16.tar.gz tcl-d5453f4a90c64ff9ea80c89e8e7c4b51e7f26d16.tar.bz2 |
Fix UtfToUtfProc() to remove the potential to read beyond end of input buffer.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclEncoding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 179ca17..a7ef199 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -2334,7 +2334,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. */ |