tcpdump mailing list archives

Re: pcap_compile() causes a segmentation fault on Ubuntu


From: Selçuk Cevher <cevhers () gmail com>
Date: Wed, 15 Dec 2010 09:45:31 +0200

The problem was with pcap_t* value - it was invalid.

I fixed it.

Thank you.

On Tue, Dec 14, 2010 at 1:46 PM, Guy Harris <guy () alum mit edu> wrote:


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.

-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: