From 94d9a914079cbadec7cd0655766948f60f2903cb Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Sun, 3 Feb 2019 13:03:40 -0500 Subject: [PATCH] Reject extraneous arguments --- endlessh.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/endlessh.c b/endlessh.c index b00012d..75c6461 100644 --- a/endlessh.c +++ b/endlessh.c @@ -492,6 +492,11 @@ main(int argc, char **argv) } } + if (argv[optind]) { + fprintf(stderr, "endlessh: too many arguments\n"); + exit(EXIT_FAILURE); + } + /* Log configuration */ config_log(&config);