Line 310 for (i = 1; argv[i] != NULL; i++) { assumes that an out-of-range i would mean argv[i]==NULL which was not true in my case. And line 311 would try to access it if (argv[i][0] != '-') break; /* not an option? */ which caused a seg fault. Wei