PyUnicode_FSDecoder() ensures that the decoded string is ready
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index ec4aed6..ef2839a 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3318,6 +3318,10 @@
             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");