cpython/Include/cpython
Serhiy Storchaka 4398b788ff
[3.12] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (#134337)
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)
(cherry picked from commit 6279eb8c07)
2025-05-25 20:33:22 -07:00
..
abstract.h
bytearrayobject.h gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766) 2022-06-13 20:09:40 +02:00
bytesobject.h [3.12] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (#134337) 2025-05-25 20:33:22 -07:00
cellobject.h
ceval.h
classobject.h gh-89653: PEP 670: Convert macros to functions (#99843) 2022-11-28 16:40:08 +01:00
code.h [3.12] gh-116767: fix crash on 'async with' with many context managers (GH-118348) (#118477) 2024-05-01 18:23:29 +01:00
compile.h
complexobject.h
context.h
descrobject.h
dictobject.h
fileobject.h
fileutils.h
floatobject.h
frameobject.h
funcobject.h [3.12] gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after use (GH-118208) (#118269) 2024-04-25 22:29:45 -07:00
genobject.h
import.h
initconfig.h
interpreteridobject.h
listobject.h
longintrepr.h [3.12] gh-116869: Make C API compatible with ISO C90 (GH-116950) (#117011) 2024-03-19 16:06:15 +00:00
longobject.h GH-101291: Add low level, unstable API for pylong (GH-101685) 2023-05-21 14:45:48 +01:00
memoryobject.h
methodobject.h
modsupport.h [3.12] gh-86493: Fix possible leaks in some modules initialization (GH-106768) (GH-106855) 2023-07-18 15:14:10 +03:00
object.h
objimpl.h
odictobject.h gh-87347: Add parenthesis around macro arguments (#93915) 2022-06-20 16:04:52 +02:00
picklebufobject.h
pthread_stubs.h
pyctype.h
pydebug.h
pyerrors.h [3.12] gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (GH-105072) (#105095) 2023-05-30 16:50:23 +01:00
pyfpe.h
pyframe.h [3.12] GH-96803: Move PyUnstable_InterpreterFrame_GetCode() to Python.h (GH-107188) (#107195) 2023-07-24 19:54:42 +00:00
pylifecycle.h
pymem.h
pystate.h [3.12] GH-112215: Backport C recursion changes (GH-115083) 2024-02-13 10:45:59 +01:00
pythonrun.h
pythread.h [3.12] gh-129296: Fix pythread.h include paths (#129320) (#130668) 2025-02-28 08:19:50 +00:00
pytime.h [3.12] gh-127906: Declare timeval struct in pytime.h on Windows (#127908) 2024-12-13 12:13:49 +00:00
setobject.h
sysmodule.h
traceback.h
tupleobject.h
unicodeobject.h [3.12] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (#134337) 2025-05-25 20:33:22 -07:00
warnings.h
weakrefobject.h