cpython/Objects
Serhiy Storchaka ab9893c406
[3.10] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (GH-134345)
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)
(cherry picked from commit a75953b347)
(cherry picked from commit 0c33e5baed)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-02 17:55:48 +02:00
..
clinic Fix bad grammar and import docstring for split/rsplit (GH-32381) (GH-32416) 2022-04-08 12:06:19 -05:00
stringlib [3.10] bpo-43504: Remove effbot urls (GH-26308) (#92161) 2022-05-02 12:21:51 -06:00
abstract.c
accu.c
boolobject.c
bytearrayobject.c [3.10] gh-101765: Fix SystemError / segmentation fault in iter __reduce__ when internal access of builtins.__dict__ exhausts the iterator (GH-101769) (#102229) 2023-02-24 19:50:53 -08:00
bytes_methods.c
bytesobject.c [3.10] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (GH-134345) 2025-06-02 17:55:48 +02:00
call.c
capsule.c
cellobject.c
classobject.c
codeobject.c [3.10] GH-96187: Prevent _PyCode_GetExtra to return garbage for negative indexes (GH-96188). (#96210) 2022-08-23 15:58:25 +01:00
complexobject.c
descrobject.c [3.10] GH-100942: Fix incorrect cast in property_copy(). (GH-100965). (#101009) 2023-01-15 12:38:59 +05:30
dict-common.h
dictnotes.txt
dictobject.c
enumobject.c
exceptions.c gh-97591: In Exception.__setstate__() acquire strong references before calling tp_hash slot (GH-97700) 2022-10-01 21:18:38 -07:00
fileobject.c
floatobject.c gh-95605: Fix float(s) error message when s contains only whitespace (GH-95665) (GH-95859) 2022-08-10 19:57:55 +01:00
frameobject.c [3.10] gh-92311: Let frame_setlineno jump over listcomps (GH-92717) 2022-05-12 16:31:43 +01:00
funcobject.c [3.10] gh-97943: PyFunction_GetAnnotations should return a borrowed reference. (GH-97949) (GH-97989) 2022-10-06 17:59:09 -07:00
genericaliasobject.c [3.10] gh-98852: Fix subscription of types.GenericAlias instances (GH-98920) (GH-98969) 2022-11-01 20:14:38 +02:00
genobject.c [3.10] GH--93592: Fix frame chain when throwing exceptions into coroutines (GH-95207) 2022-08-23 12:23:39 +01:00
interpreteridobject.c
iterobject.c [3.10] gh-101892: Fix SystemError when a callable iterator call exhausts the iterator (GH-101896) (#102422) 2023-03-04 20:56:12 +05:30
listobject.c [3.10] gh-101765: Fix refcount issues in list and unicode pickling (GH-102265) (#102269) 2023-02-25 16:38:00 -08:00
listsort.txt
lnotab_notes.txt
longobject.c gh-95778: Mention sys.set_int_max_str_digits() in error message (GH-96874) 2022-09-16 11:30:05 -07:00
memoryobject.c gh-92888: Fix memoryview bad __index__ use after free (GH-92946) (GH-93950) 2022-06-23 18:10:14 +08:00
methodobject.c
moduleobject.c
namespaceobject.c
object.c gh-99845: _PyObject_DictPointer(): fix dictoffset cast (GH-99922) 2022-12-01 05:32:15 -08:00
obmalloc.c obmalloc: Remove unused variable. (GH-98770) 2022-10-27 09:33:44 -07:00
odictobject.c
picklebufobject.c [3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91662) 2022-04-19 13:01:09 -07:00
rangeobject.c
README
setobject.c bpo-46615: Don't crash when set operations mutate the sets (GH-31120) 2022-02-11 12:44:17 -08:00
sliceobject.c
structseq.c
tupleobject.c [3.10] gh-101765: Fix SystemError / segmentation fault in iter __reduce__ when internal access of builtins.__dict__ exhausts the iterator (GH-101769) (#102229) 2023-02-24 19:50:53 -08:00
typeobject.c gh-93021: Fix __text_signature__ for __get__ (GH-93023) (GH-94086) 2022-06-21 22:32:24 +02:00
typeslots.inc
typeslots.py
unicodectype.c
unicodeobject.c [3.10] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944) (GH-134345) 2025-06-02 17:55:48 +02:00
unicodetype_db.h
unionobject.c [3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91662) 2022-04-19 13:01:09 -07:00
weakrefobject.c [3.10] gh-79512: Fixed names and __module__ value of weakref classes (GH-93719) (GH-94071) 2022-06-21 22:36:09 +03:00

Source files for various builtin objects