CC: | bug-Net-Pcap [...] rt.cpan.org |
Subject: | Re: Net::Pcap 0.14 |
Date: | Thu, 22 Feb 2007 02:23:04 +0100 |
To: | Eric Atkin <eric [...] certus.bz> |
From: | Sébastien Aperghis-Tramoni <saper [...] cpan.org> |
Eric Atkin wrote:
Show quoted text
> Hey,
> I think I found a bug in your Net::Pcap module with regard to the
> pcap_next_ex
> function. The scalar that I would pass as \$packet would always be
> undefined
> after next_ex returned. I've included a patch that makes it work
> for me.
> Please let me know if I've misunderstood something so I can quit
> using my
> patched version of Net::Pcap.
Hello,
I've already been made aware of this problem, see the following ticket:
» https://rt.cpan.org/Ticket/Display.html?id=24143
I've tried your patch but it does not resolve the problem on my Linux
box, and since I first looked at it, I'm wondering how it could
possibly work better than the previous code because newSVpv() is
implemented by calling new_SV() and then sv_setpvn(). I'm also
surprised that it doesn't crash because you're trying to dereference
pkt_data with SvRV() even though it's just a SV, and given that it's
uninitialized at this time.
Note that I can be totally wrong as my XS knowledge is quite limited.
(I'm just the maintainer of Net::Pcap, I didn't wrote most parts of
the XS code.)
Thanks anyway for your report and for your patch.
--
Sébastien Aperghis-Tramoni
Close the world, txEn eht nepO.