From 05107b6af7c492e8090bf3a2de06cc8930d84102 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Wed, 19 Feb 2003 04:08:27 +0000 Subject: [PATCH] os.mkdir() would crash with a Unicode filename and mode param. --- Modules/posixmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 975c343a1cd..d203378d3df 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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. */