tcpdump mailing list archives

Re: pcap_compile() causes a segmentation fault on Ubuntu


From: Guy Harris <guy () alum mit edu>
Date: Tue, 14 Dec 2010 03:46:52 -0800


On Dec 14, 2010, at 1:05 AM, Selçuk Cevher wrote:

If  you need to see the sources for listAllDevices() and openNetworkDevice()
as well, I can post them.

I definitely need to see the source code for openNetworkDevice().  Presumably its first argument is a reference to a 
pcap_t *, but, if it returns a value, main() doesn't appear to check the value, so, if it fails to open any of the 
devices in the list for capturing, and thus has no pcap_t * value to set handle to, handle might not have a valid 
value, and thus pcap_compile() might crash.  (Perhaps it throws an exception if it fails to open any device.)

What may cause pcap_compile() to crash ?

An invalid value for handle could cause it to crash.-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: