Skip to content

Commit

Permalink
Fix segfault when argument list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhernand committed Mar 4, 2016
1 parent c38e01b commit 14b46af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trf.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(int ac, char** av)
}

/* Expects exactly 8 non-option arguments */
if ( (ac < 9) && ((strcmp(av[1], "-v") != 0) && (strcmp(av[1], "-V") != 0)) ) {
if (ac < 9) {
fprintf(stderr, usage, av[0]);
exit(1);
}
Expand Down

0 comments on commit 14b46af

Please sign in to comment.