summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c5
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;