mirror of
https://github.com/python/cpython.git
synced 2025-09-14 12:46:49 +00:00
#2242: utf7 decoding crashes on bogus input on some Windows/MSVC versions
This commit is contained in:
parent
5255cba4bc
commit
4982d5d04a
2 changed files with 4 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue