diff Objects/unicodeobject.c @ 48070:35a462ff9873 legacy-trunk

#2242: utf7 decoding crashes on bogus input on some Windows/MSVC versions
author Antoine Pitrou <solipsis@pitrou.net>
date Fri, 25 Jul 2008 17:45:59 +0000
parents 5c33009994b4
children c4d24fc8ba8a
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Fri Jul 25 17:02:11 2008 +0000
+++ b/Objects/unicodeobject.c	Fri Jul 25 17:45:59 2008 +0000
@@ -1523,7 +1523,7 @@
     while (s < e) {
         Py_UNICODE ch;
         restart:
-        ch = *s;
+        ch = (unsigned char) *s;
 
         if (inShift) {
             if ((ch == '-') || !B64CHAR(ch)) {