From: Nils Larsch Date: Tue, 10 May 2005 09:52:39 +0000 (+0000) Subject: improve command line argument checking X-Git-Tag: BEN_FIPS_TEST_8~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=88f62fb98ac0d9cf15aadf0b96421fbbad544abb;p=oweals%2Fopenssl.git improve command line argument checking PR: 1061 --- diff --git a/apps/engine.c b/apps/engine.c index 12283d0aed..e8a599f9e5 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -387,11 +387,15 @@ int MAIN(int argc, char **argv) else if (strcmp(*argv,"-pre") == 0) { argc--; argv++; + if (argc == 0) + goto skip_arg_loop; sk_push(pre_cmds,*argv); } else if (strcmp(*argv,"-post") == 0) { argc--; argv++; + if (argc == 0) + goto skip_arg_loop; sk_push(post_cmds,*argv); } else if ((strncmp(*argv,"-h",2) == 0) ||