cpython/Objects
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
..
clinic
stringlib
abstract.c
boolobject.c
bytearrayobject.c
bytes_methods.c
bytesobject.c [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
call.c
capsule.c
cellobject.c
classobject.c [3.12] GH-106895: Raise a ValueError when attempting to disable events that cannot be disabled. (GH-107337) (GH-107351) 2023-07-28 10:53:33 +01:00
codeobject.c
complexobject.c
descrobject.c
dictnotes.txt
dictobject.c
enumobject.c
exception_handling_notes.txt
exceptions.c [3.12] gh-123378: fix a crash in UnicodeError.__str__ (GH-124935) (#125098) 2024-10-08 11:56:18 +00:00
fileobject.c
floatobject.c
frame_layout.md
frameobject.c [3.12] gh-130809: Fix PyFrame_LocalsToFast copying the wrong value (#130816) 2025-03-10 20:27:07 -04:00
funcobject.c
genericaliasobject.c
genobject.c
interpreteridobject.c
iterobject.c
listobject.c
listsort.txt
lnotab_notes.txt
locations.md
longobject.c
memoryobject.c
methodobject.c
moduleobject.c
namespaceobject.c
object.c [3.12] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-125205) 2024-12-03 10:26:25 -07:00
object_layout.md
object_layout_312.gv
object_layout_312.png
object_layout_full_312.gv
object_layout_full_312.png
obmalloc.c [3.12] gh-100227: Lock Around Modification of the Global Allocators State (gh-105516) (gh-105532) 2023-06-08 22:35:53 +00:00
odictobject.c
picklebufobject.c
rangeobject.c
README
setobject.c
sliceobject.c
structseq.c
tupleobject.c
typeobject.c
typeslots.inc
typeslots.py
typevarobject.c
unicodectype.c
unicodeobject.c [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
unicodetype_db.h
unionobject.c
weakrefobject.c gh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter (gh-104072) 2023-05-01 19:36:00 -06:00

Source files for various builtin objects