summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-07-25 19:00:48 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2008-07-25 19:00:48 +0000
commitc8e4bed1c5a11b0447feb38d0870af056a71ad2c (patch)
treecc2308b54eb269da7e4daa7e793f89ffe13ed413 /Objects/unicodeobject.c
parentab396e07cc7c6aff0723d406f3037b24645b6049 (diff)
downloadcpython-git-c8e4bed1c5a11b0447feb38d0870af056a71ad2c.tar.gz
#2242: utf7 decoding crashes on bogus input on some Windows/MSVC versions
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index e2f1ed323d..3cf7fa65d2 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -974,7 +974,7 @@ PyObject *PyUnicode_DecodeUTF7(const char *s,
while (s < e) {
Py_UNICODE ch;
restart:
- ch = *s;
+ ch = (unsigned char) *s;
if (inShift) {
if ((ch == '-') || !B64CHAR(ch)) {