pynetwork / pypcap

pypcap - python libpcap module, forked from code.google.com/p/pypcap
Other
299 stars 74 forks source link

Avoid packet buffer overwriting. #43

Closed rgom closed 5 years ago

rgom commented 7 years ago

Use PyString_FromStringAndSize instead of PyBuffer_FromMemory to make sure packets buffers are not unintentionally shared.

rgom commented 7 years ago

Note 1: untested. I have just submitted a PR against fork solution. I'm not even an author of the fix. Note 2: the commit message would need some love, presumably (refer to bug? other fork?)

hellais commented 7 years ago

Thanks for this!

It would be good if we could have a unittest for this to ensure it's fixed.

hellais commented 5 years ago

This is superseeded by: https://github.com/pynetwork/pypcap/pull/80