cpython/Parser
Serhiy Storchaka 6279eb8c07
[3.13] 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 9f69a58623)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 14:46:57 +02:00
..
lexer [3.13] gh-132769: Refactor possible read-out-of-bounds in lexer.c (GH-132770) (#132788) 2025-04-21 22:42:55 +00:00
tokenizer
action_helpers.c [3.13] gh-125331: Allow the parser to activate future imports on the fly (GH-125482) (#131062) 2025-03-10 22:20:38 +00:00
asdl.py
asdl_c.py
myreadline.c
parser.c [3.13] gh-125331: Allow the parser to activate future imports on the fly (GH-125482) (#131062) 2025-03-10 22:20:38 +00:00
peg_api.c
pegen.c [3.13] gh-133516: Raise ValueError when constants True, False or None are used as an identifier after NFKC normalization (GH-133523) (#133615) 2025-05-08 12:18:26 +01:00
pegen.h [3.13] gh-125331: Allow the parser to activate future imports on the fly (GH-125482) (#131062) 2025-03-10 22:20:38 +00:00
pegen_errors.c [3.13] gh-116042: Fix location for SyntaxErrors of invalid escapes in the tokenizer (GH-116049) (#130066) 2025-02-13 01:49:25 +00:00
Python.asdl
string_parser.c [3.13] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) 2025-05-20 14:46:57 +02:00
string_parser.h
token.c