Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 477f526..379a90c 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -1501,6 +1501,12 @@
PyObject *element /* Element string */
);
+/* Checks whether the string contains any NUL characters. */
+
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(int) _PyUnicode_HasNULChars(PyObject *);
+#endif
+
/* Checks whether argument is a valid identifier. */
PyAPI_FUNC(int) PyUnicode_IsIdentifier(PyObject *s);