Hi,
yesterday I sent this patch from git, but it seems it got stuck on its
way and did not arrive to the list (at least I don't see it in the list
archives), so I'm resending it as attachment.
The patch itself is just simple one-liner, see comments inside.
Jan
Fix parsing of unknown arguments
From: Jan Safranek <jsafr...@redhat.com>
'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 <jsafr...@redhat.com>
---
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 */
_______________________________________________
Freeipmi-users mailing list
Freeipmi-users@gnu.org
http://lists.gnu.org/mailman/listinfo/freeipmi-users