[Nagiosplug-checkins] nagiosplug/plugins urlize.c,1.19,1.20
Harper Mann
harpermann at users.sourceforge.net
Fri Jul 7 08:36:06 CEST 2006
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv1993
Modified Files:
urlize.c
Log Message:
Added check for two arguments. Was segfaulting if no or one arg. Now returns
help.
Index: urlize.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/urlize.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- urlize.c 18 Jun 2006 19:36:48 -0000 1.19
+++ urlize.c 7 Jul 2006 06:36:03 -0000 1.20
@@ -56,6 +56,12 @@
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ /* Need at least 2 args */
+ if (argc < 3) {
+ print_help();
+ exit (STATE_UNKNOWN);
+ }
+
while (1) {
c = getopt_long (argc, argv, "+hVu:", longopts, &option);
More information about the Commits
mailing list