os.mkdir() would crash with a Unicode filename and mode param.
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 19 Feb 2003 04:08:27 +0000 (04:08 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Wed, 19 Feb 2003 04:08:27 +0000 (04:08 +0000)
Modules/posixmodule.c

index 975c343a1cd695a078c65e3492cae835529a0d6d..d203378d3dfaeae22087226ab072fd803c7a8ef8 100644 (file)
@@ -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. */