From de0cc0de13fcf84a022e88233040605db3ed88b3 Mon Sep 17 00:00:00 2001 From: Hauke Neitzel Date: Thu, 24 Mar 2016 09:15:59 +0100 Subject: [PATCH] fixed segfault when using new -o option when using the (relatively new) -o Host-header override option, getopt was not told to expect the extra string argument, leading to a segfault. --- cmdline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmdline.c b/cmdline.c index a88448a..28d321f 100644 --- a/cmdline.c +++ b/cmdline.c @@ -163,7 +163,7 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar args_info->proctitle_arg = NULL; \ args_info->enforcetls1_flag = 0; \ args_info->host_arg = NULL; \ -} +} clear_args(); @@ -209,9 +209,9 @@ int cmdline_parser( int argc, char * const *argv, struct gengetopt_args_info *ar { NULL, 0, NULL, 0 } }; - c = getopt_long (argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:nvNeEXqLo", long_options, &option_index); + c = getopt_long (argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:nvNeEXqLo:", long_options, &option_index); #else - c = getopt( argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:nvNeEXqLo" ); + c = getopt( argc, argv, "hVia:u:s:t:F:p:P:r:R:d:H:x:nvNeEXqLo:" ); #endif if (c == -1)