Index: Modules/posixmodule.c =================================================================== --- Modules/posixmodule.c (revision 78987) +++ Modules/posixmodule.c (working copy) @@ -2952,6 +2952,11 @@ 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) {