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 f729e88..8fb7aaa 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -2952,6 +2952,11 @@ posix_execv(PyObject *self, PyObject *args) PyMem_Free(path); return NULL; } + if (argc < 1) { + PyErr_SetString(PyExc_ValueError, "execv() arg 2 must not be empty"); + PyMem_Free(path); + return NULL; + } argvlist = PyMem_NEW(char *, argc+1); if (argvlist == NULL) { |