On Sep 17, 2009, at 3:24 PM, Dustin Spicuzza wrote:

If you call linux_if_drops with a NULL device, then it segfaults when it
tries to do strlen(). The only time this happens is if you call
pcap_stats() on a pcap handle that is open but not activated (or the
activation failed), and thus the device is NULL.

If you call pcap_stats() on a pcap handle that's open but not activated, p->stats_op points to pcap_not_initialized(), so pcap_stats() will just return an error.

That wasn't necessarily true if the activation failed, as the activate routine might have set the op pointers early in the process and not undone that if the activation fails; I've checked in a change to restore the op pointers on a failed activation.

That should make this a non-issue.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to