Commit 065836ec authored by Victor Stinner's avatar Victor Stinner

PyUnicode_FSDecoder() ensures that the decoded string is ready

parent 7592d051
......@@ -3318,6 +3318,10 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
return 0;
}
}
if (PyUnicode_READY(output) < 0) {
Py_DECREF(output);
return 0;
}
if (findchar(PyUnicode_DATA(output), PyUnicode_KIND(output),
PyUnicode_GET_LENGTH(output), 0, 1) >= 0) {
PyErr_SetString(PyExc_TypeError, "embedded NUL character");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment