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 5f27255..a77794a 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);
                }