File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed 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+
1316Library
1417-------
1518
Original file line number Diff line number Diff line change @@ -3059,24 +3059,16 @@ PyUnicode_AsDecodedObject(PyObject *unicode,
30593059 const char * encoding ,
30603060 const char * errors )
30613061{
3062- PyObject * v ;
3063-
30643062 if (!PyUnicode_Check (unicode )) {
30653063 PyErr_BadArgument ();
3066- goto onError ;
3064+ return NULL ;
30673065 }
30683066
30693067 if (encoding == NULL )
30703068 encoding = PyUnicode_GetDefaultEncoding ();
30713069
30723070 /* Decode via the codec registry */
3073- v = PyCodec_Decode (unicode , encoding , errors );
3074- if (v == NULL )
3075- goto onError ;
3076- return unicode_result (v );
3077-
3078- onError :
3079- return NULL ;
3071+ return PyCodec_Decode (unicode , encoding , errors );
30803072}
30813073
30823074PyObject *
You can’t perform that action at this time.
0 commit comments