File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ Release date: TBA
1010Core and Builtins
1111-----------------
1212
13+ - Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
14+ build.
15+
1316- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
1417 loss in PyTraceBack_Here().
1518
Original file line number Diff line number Diff line change @@ -3026,24 +3026,16 @@ PyUnicode_AsDecodedObject(PyObject *unicode,
30263026 const char * encoding ,
30273027 const char * errors )
30283028{
3029- PyObject * v ;
3030-
30313029 if (!PyUnicode_Check (unicode )) {
30323030 PyErr_BadArgument ();
3033- goto onError ;
3031+ return NULL ;
30343032 }
30353033
30363034 if (encoding == NULL )
30373035 encoding = PyUnicode_GetDefaultEncoding ();
30383036
30393037 /* Decode via the codec registry */
3040- v = PyCodec_Decode (unicode , encoding , errors );
3041- if (v == NULL )
3042- goto onError ;
3043- return unicode_result (v );
3044-
3045- onError :
3046- return NULL ;
3038+ return PyCodec_Decode (unicode , encoding , errors );
30473039}
30483040
30493041PyObject *
You can’t perform that action at this time.
0 commit comments