From 14b46af370abd354cc222f598fd44c8054384139 Mon Sep 17 00:00:00 2001 From: Yozen Hernandez Date: Fri, 4 Mar 2016 13:26:48 -0500 Subject: [PATCH] Fix segfault when argument list is empty --- trf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trf.c b/trf.c index e2ceecc..4477ee4 100644 --- a/trf.c +++ b/trf.c @@ -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); }