summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-07-25 17:45:59 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2008-07-25 17:45:59 (GMT)
commit4982d5d04acff706cd43c77e757c0121a14a0c8d (patch)
treec47d0da9c8a8c48a05494e21071e1b51bfe399fd /Objects
parent5255cba4bc64c1571a167ce2b297f19ff0238899 (diff)
downloadcpython-4982d5d04acff706cd43c77e757c0121a14a0c8d.zip
cpython-4982d5d04acff706cd43c77e757c0121a14a0c8d.tar.gz
cpython-4982d5d04acff706cd43c77e757c0121a14a0c8d.tar.bz2
#2242: utf7 decoding crashes on bogus input on some Windows/MSVC versions
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index a62e929..16d97c3 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1523,7 +1523,7 @@ PyObject *PyUnicode_DecodeUTF7Stateful(const char *s,
while (s < e) {
Py_UNICODE ch;
restart:
- ch = *s;
+ ch = (unsigned char) *s;
if (inShift) {
if ((ch == '-') || !B64CHAR(ch)) {