diff options
| author | dgp@users.sourceforge.net <dgp> | 2015-04-24 15:48:56 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2015-04-24 15:48:56 (GMT) |
| commit | 218f5e072e6ae0e7eea3a47a62352b7e0f75aed4 (patch) | |
| tree | 4039637916184060e9eec1a5154695b3d4ed5a64 /generic/tclEncoding.c | |
| parent | 8a5bf4e95a96c9934becce7991569bf1ab2fc781 (diff) | |
| parent | 43e48c237002e59d9449c3e57fe6136f52c19f72 (diff) | |
| download | tcl-218f5e072e6ae0e7eea3a47a62352b7e0f75aed4.zip tcl-218f5e072e6ae0e7eea3a47a62352b7e0f75aed4.tar.gz tcl-218f5e072e6ae0e7eea3a47a62352b7e0f75aed4.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 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. */ |
