diff options
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 5df4df6..b9e8e1e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -4341,6 +4341,7 @@ PyUnicode_DecodeUTF7Stateful(const char *s,                      Py_UCS4 outCh = (Py_UCS4)(base64buffer >> (base64bits-16));                      base64bits -= 16;                      base64buffer &= (1 << base64bits) - 1; /* clear high bits */ +                    assert(outCh <= 0xffff);                      if (surrogate) {                          /* expecting a second surrogate */                          if (Py_UNICODE_IS_LOW_SURROGATE(outCh)) { @@ -4408,6 +4409,7 @@ PyUnicode_DecodeUTF7Stateful(const char *s,                  inShift = 1;                  shiftOutStart = writer.pos;                  base64bits = 0; +                base64buffer = 0;              }          }          else if (DECODE_DIRECT(ch)) { /* character decodes as itself */  | 
