# DP: Issue #8154, fix segfault with os.execlp('true') Index: python2.6-2.6.5+20100521/Modules/posixmodule.c =================================================================== --- python2.6-2.6.5+20100521.orig/Modules/posixmodule.c 2010-05-21 16:11:09.200741779 +0200 +++ python2.6-2.6.5+20100521/Modules/posixmodule.c 2010-05-21 16:17:59.203713876 +0200 @@ -2979,6 +2979,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) {