]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
charon-cmd: Stop processing options if an argument is missing or an option not recognized
authorTobias Brunner <tobias@strongswan.org>
Tue, 7 May 2013 12:53:27 +0000 (14:53 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 May 2013 10:30:33 +0000 (12:30 +0200)
src/charon-cmd/charon-cmd.c

index 5f27255a98b627e3d11d68bb891ecdd165244035..a77794abe6985b799fbd67e82becea8bc2d0352c 100644 (file)
@@ -282,6 +282,9 @@ static void handle_arguments(int argc, char *argv[])
                                {
                                        continue;
                                }
+                               /* fall-through */
+                       case '?':
+                               /* missing argument, unrecognized option */
                                usage(stderr, NULL, argv[0]);
                                exit(1);
                }