Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault if operating on a closed sniffer #90

Open
dainok opened this issue Feb 8, 2019 · 1 comment
Open

Segmentation fault if operating on a closed sniffer #90

dainok opened this issue Feb 8, 2019 · 1 comment

Comments

@dainok
Copy link

dainok commented Feb 8, 2019

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
Copy link
Member

hellais commented Jun 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants