diff options
author | dgp <dgp@users.sourceforge.net> | 2015-04-24 15:47:58 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-04-24 15:47:58 (GMT) |
commit | ae445193f4014a405dad671de52f4b4aae4959d9 (patch) | |
tree | c18e561084029e6193ad76d6e83304f63f9607a8 /generic | |
parent | 1590eb50c516f4fdf7b89882a806258d01bcbee1 (diff) | |
download | tcl-ae445193f4014a405dad671de52f4b4aae4959d9.zip tcl-ae445193f4014a405dad671de52f4b4aae4959d9.tar.gz tcl-ae445193f4014a405dad671de52f4b4aae4959d9.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 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. */ |