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 | 9c7addd0fee93ed5ccdf1faeccf7994924e2d6ca (patch) | |
tree | c18e561084029e6193ad76d6e83304f63f9607a8 /generic/tclEncoding.c | |
parent | f7cd99b5152a34e5eecde3de08db482435ddf2eb (diff) | |
download | tcl-9c7addd0fee93ed5ccdf1faeccf7994924e2d6ca.zip tcl-9c7addd0fee93ed5ccdf1faeccf7994924e2d6ca.tar.gz tcl-9c7addd0fee93ed5ccdf1faeccf7994924e2d6ca.tar.bz2 |
Fix UtfToUtfProc() to remove the potential to read beyond end of input buffer.
Diffstat (limited to 'generic/tclEncoding.c')
-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. */ |