[Hlfl-cvs] hlfl/src hlfl.c,1.45,1.46
asl at hlfl.org
asl at hlfl.org
Thu May 27 07:18:33 EDT 2004
Update of /usr/local/cvs/hlfl/src
In directory raccoon.nessus.org:/tmp/cvs-serv10695
Modified Files:
hlfl.c
Log Message:
Redefine verbose as an operator without args, in order to catch a segfault when using "hlfl -v" without an argument, rendering optarg to be null
Index: hlfl.c
===================================================================
RCS file: /usr/local/cvs/hlfl/src/hlfl.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- hlfl.c 6 Oct 2003 11:35:51 -0000 1.45
+++ hlfl.c 27 May 2004 11:18:31 -0000 1.46
@@ -58,7 +58,7 @@
#ifdef HAVE_GETOPT
/* option string for getopt() or getopt_long() */
-char *optstr = "hvV:c:t:o:";
+char *optstr = "c:t:o:hvV";
#ifdef HAVE_GETOPT_LONG
/* array of long option structs for getopt_long() */
struct option long_options[] = {
@@ -66,7 +66,7 @@
{"output", 1, 0, 'o'},
{"type", 1, 0, 't'},
{"version", 0, 0, 'V'},
- {"verbose", 1, 0, 'v'},
+ {"verbose", 0, 0, 'v'},
{"check", 1, 0, 'c'},
{0, 0, 0, 0}
};
@@ -1166,7 +1166,7 @@
break;
}
case 'v':{
- verbose_level = atoi(optarg);
+ verbose_level = 1;
break;
}
case 'V':{
More information about the Hlfl-cvs
mailing list