Try to check if setproctitle() constructor got passed arguments

This commit is contained in:
Guillem Jover 2013-06-08 17:55:19 +02:00
parent 6faea4d2a0
commit 50e4c55afd

View File

@ -135,6 +135,10 @@ spt_init(int argc, char *argv[], char *envp[])
char *base, *end, *nul, *tmp;
int i, error;
/* Try to make sure we got called with main() arguments. */
if (argc < 0)
return;
base = argv[0];
if (base == NULL)
return;