Segmentation fault if operating on a closed sniffer
dainok opened this issue · 1 comments
dainok commented
Tested on:
- Python 3.6.4
- both Linux and MacOS (same behaviour)
- pypcap 1.2.2
Steps to reproduce:
import pcap
a = pcap.pcap()
a.close()
a.close()
Segmentation fault: 11
I think that pypcap should raise an exception, avoiding a segmentation fault.
hellais commented
Yes this seems like a bug. We should at least raise an exception and keep track of the opened state in python or ideally fix it in the underlying c code.