[ARGUS] Then again, perhaps a bug after all ...

Peter Van Epp vanepp at sfu.ca
Fri Oct 15 00:28:40 EDT 2004


	Poking at Solaris, it looks like good old getopt is biting me:

(gdb) print optarg
$10 = 0xffbffc2b "/tmp/com_argus.2004.10.10.22.00.00.0.gz"
(gdb) s
445                    if (!(ArgusAddFileList (optarg, (Cflag ? ARGUS_CISCO_DATA_SOURCE : ARGUS_DATA_SOURCE), -1, -1))) {
(gdb) print optarg
$11 = 0xffbffc2b "/tmp/com_argus.2004.10.10.22.00.00.0.gz"
(gdb) s
ArgusAddFileList (ptr=0x0, mode=1, ostart=-1, ostop=-1) at argus_parse.c:3070
3070       if (ptr) {
(gdb) print ptr
$12 = 0x0
	
	after the call to ArgusAddFileList optarg has become NULL which is 
just plain wrong and causes a segfault in a while. The problem is I don't see
why its wrong, it seems correct before the call, but not after). The same
thing on FreeBSD where it works correctly:

445                    if (!(ArgusAddFileList (optarg, (Cflag ? ARGUS_CISCO_DATA_SOURCE : ARGUS_DATA_SOURCE), -1, -1))) {
(gdb)
ArgusAddFileList (
    ptr=0xbfbffc4f "/var/log/argus/com_argus.2004.10.10.22.00.00.0.gz",
    mode=1, ostart=-1, ostop=-1) at ./argus_parse.c:3066
3066    {


Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada



More information about the argus mailing list