Exiqgrep: check arg parsing. Bug 2821
authorJeremy Harris <jgh146exb@wizmail.org>
Mon, 18 Oct 2021 10:01:47 +0000 (11:01 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Mon, 18 Oct 2021 10:01:47 +0000 (11:01 +0100)
src/src/exiqgrep.src

index c8762df479da01279db8d73d9a4a1ad3a57ecd93..04602da680c62f41eb6cd5caeb655ea383d64ef7 100644 (file)
@@ -53,7 +53,7 @@ if ($ARGV[0] eq '--version') {
         exit 0;
 }
 
-getopts('hf:r:y:o:s:C:zxlibRcaG:',\%opt);
+if (!getopts('hf:r:y:o:s:C:zxlibRcaG:',\%opt) { &help; exit;}
 if ($ARGV[0]) { &help; exit;}
 if ($opt{h}) { &help; exit;}
 if ($opt{a}) { $eargs = '-bp'; }