Commit 37cd2d2a authored by Steve Dower's avatar Steve Dower

Issue #28732: Raise ValueError when argv[0] is empty.

parent 29130474
......@@ -5210,6 +5210,15 @@ os_spawnv_impl(PyObject *module, int mode, PyObject *path, PyObject *argv)
"spawnv() arg 2 must contain only strings");
return NULL;
}
#ifdef MS_WINDOWS
if (i == 0 && !argvlist[0][0]) {
free_string_array(argvlist, i);
PyErr_SetString(
PyExc_ValueError,
"spawnv() arg 2 first element cannot be empty");
return NULL;
}
#endif
}
argvlist[argc] = NULL;
......
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