summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclEncoding.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 466dcb2..f330230 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-04 Joe English <jenglish@users.sourceforge.net>
+
+ * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension
+ when converting incomplete UTF-8 sequences. See [Bug 1908443] for
+ details.
+
2008-07-03 Andreas Kupries <andreask@activestate.com>
* generic/tclIORChan.c (InvokeTclMethod): Fixed the memory leak
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 95f89a4..1d4de73 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEncoding.c,v 1.59 2008/03/11 22:25:12 das Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.59.2.1 2008/07/04 19:22:21 jenglish Exp $
*/
#include "tclInt.h"
@@ -2292,7 +2292,7 @@ UtfToUtfProc(
* incomplete char its byts are made to represent themselves.
*/
- ch = (Tcl_UniChar) *src;
+ ch = (unsigned char) *src;
src += 1;
dst += Tcl_UniCharToUtf(ch, dst);
} else {