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.
This commit is contained in:
Hauke Neitzel 2016-03-24 09:15:59 +01:00
parent e0ae50f789
commit de0cc0de13

View file

@ -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)