Issue #18408: Fix marshal reader for Unicode strings: handle

PyUnicode_DecodeUTF8() failure (ex: MemoryError).
This commit is contained in:
Victor Stinner 2013-07-08 22:23:32 +02:00
parent b27cd3e5ad
commit 3a8b79d4d2
1 changed files with 4 additions and 0 deletions

View File

@ -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;