Kaydet (Commit) 05107b6a authored tarafından Mark Hammond's avatar Mark Hammond

os.mkdir() would crash with a Unicode filename and mode param.

üst 90195e26
......@@ -1863,7 +1863,7 @@ posix_mkdir(PyObject *self, PyObject *args)
#ifdef Py_WIN_WIDE_FILENAMES
if (unicode_file_names()) {
PyUnicodeObject *po;
if (PyArg_ParseTuple(args, "U|i:mkdir", &po)) {
if (PyArg_ParseTuple(args, "U|i:mkdir", &po, &mode)) {
Py_BEGIN_ALLOW_THREADS
/* PyUnicode_AS_UNICODE OK without thread lock as
it is a simple dereference. */
......
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