Nmap Development mailing list archives

[Pcap] Fixed Valgrind error message.


From: "Luis MartinGarcia." <luis.mgarc () gmail com>
Date: Wed, 22 Sep 2010 11:46:23 +0200

Hi,

I've been tracking down an error in libpcap reported by Valgrind. The
error is the following:

==22214== Syscall param socketcall.setsockopt(optval) points to
uninitialised byte(s)
==22214==    at 0x62F774A: setsockopt (syscall-template.S:82)
==22214==    by 0x4E33B85: ??? (in /usr/lib/libpcap.so.1.0.0)
==22214==    by 0x4E33D0D: ??? (in /usr/lib/libpcap.so.1.0.0)
==22214==    by 0x432253: nsock_pcap_set_filter (in /usr/local/bin/nping)
==22214==    by 0x432557: nsock_pcap_open (in /usr/local/bin/nping)
==22214==    by 0x4295FF: ProbeMode::start() (in /usr/local/bin/nping)
==22214==    by 0x40B2E1: main (in /usr/local/bin/nping)

I've just commited a patch that adds a simple memset() that initializes
a structure to zero. This makes the problem go away.

I've sent a report to the tcpdump-workers lists requesting the patch to
be applied to mainstream. However, as the patch is so small and simple,
I'm applying it to our own version now. I hope this is OK.

Regards,

Luis MartinGarcia.



_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: