mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
* [3.9] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) If the error handler is used, a new bytes object is created to set as the object attribute of UnicodeDecodeError, and that bytes object then replaces the original data. A pointer to the decoded data will became invalid after destroying that temporary bytes object. So we need other way to return the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal(). _PyBytes_DecodeEscape() does not have such issue, because it does not use the error handlers registry, but it should be changed for compatibility with _PyUnicode_DecodeUnicodeEscapeInternal(). (cherry picked from commit |
||
|---|---|---|
| .. | ||
| pegen | ||
| pgen | ||
| acceler.c | ||
| asdl.py | ||
| asdl_c.py | ||
| grammar1.c | ||
| listnode.c | ||
| myreadline.c | ||
| node.c | ||
| parser.c | ||
| parser.h | ||
| parsetok.c | ||
| Python.asdl | ||
| token.c | ||
| tokenizer.c | ||
| tokenizer.h | ||