Fix an infinite loop in the UTF-8 decoding code with invalid input

This commit is contained in:
Kovid Goyal 2017-01-18 12:19:29 +05:30
parent de46c260b1
commit a9efe7036c

View File

@ -657,6 +657,7 @@ _parse_bytes(Screen *screen, uint8_t *buf, Py_ssize_t len, PyObject DUMP_UNUSED
if (prev != UTF8_ACCEPT) i--;
break;
}
prev = screen->utf8_state;
}
}
FLUSH_DRAW;