diff options
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 89fb08b..90d820f 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -866,6 +866,11 @@ path_converter(PyObject *o, void *p) { Py_DECREF(unicode); return 0; } + if (wcslen(wide) != length) { + FORMAT_EXCEPTION(PyExc_ValueError, "embedded null character"); + Py_DECREF(unicode); + return 0; + } path->wide = wide; path->narrow = NULL; |