Try to check if setproctitle() constructor got passed arguments
diff --git a/src/setproctitle.c b/src/setproctitle.c
index 2137190..e4f648a 100644
--- a/src/setproctitle.c
+++ b/src/setproctitle.c
@@ -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;