Issue #18408: Fix marshal reader for Unicode strings: handle
PyUnicode_DecodeUTF8() failure (ex: MemoryError).
This commit is contained in:
parent
b27cd3e5ad
commit
3a8b79d4d2
|
@ -998,6 +998,10 @@ r_object(RFILE *p)
|
|||
else {
|
||||
v = PyUnicode_New(0, 0);
|
||||
}
|
||||
if (v == NULL) {
|
||||
retval = NULL;
|
||||
break;
|
||||
}
|
||||
if (type == TYPE_INTERNED)
|
||||
PyUnicode_InternInPlace(&v);
|
||||
retval = v;
|
||||
|
|
Loading…
Reference in New Issue