Fix parsing of unknown arguments From: Jan Safranek 'ipmidetectd --foo' in current CVS HEAD (and all previous releases) results in segmentation fault, because getopt_long argument is not properly terminated. Following patch adds the terminating entry, fixing ipmidetectd when parsing unknown command line arguments. Signed-off-by: Jan Safranek --- ipmidetect/src/ipmidetectd/ipmidetectd_config.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/ipmidetect/src/ipmidetectd/ipmidetectd_config.c b/ipmidetect/src/ipmidetectd/ipmidetectd_config.c index 4f5607f..9a5e140 100644 --- a/ipmidetect/src/ipmidetectd/ipmidetectd_config.c +++ b/ipmidetect/src/ipmidetectd/ipmidetectd_config.c @@ -107,6 +107,7 @@ _cmdline_parse (int argc, char **argv) { "config-file", 1, NULL, 'c'}, { "debug", 0, NULL, 'd'}, #endif /* NDEBUG */ + { NULL, 0, NULL, 0}, }; #endif /* HAVE_GETOPT_LONG */