aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pathlib/support/lexical_path.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2025-05-12 20:42:23 +0300
committerGitHub <noreply@github.com>2025-05-12 20:42:23 +0300
commit9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e (patch)
tree227d1096d051189bdebbb236e9826a1f4594acb5 /Lib/test/test_pathlib/support/lexical_path.py
parent734e15b70dc044f57df4049a22dd769dffdb7d18 (diff)
downloadcpython-9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e.tar.gz
cpython-9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e.zip
gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648)
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().
Diffstat (limited to 'Lib/test/test_pathlib/support/lexical_path.py')
0 files changed, 0 insertions, 0 deletions