Skip Menu |

This queue is for tickets about the Net-RawIP CPAN distribution.

Report information
The Basics
Id: 29186
Status: resolved
Priority: 0/
Queue: Net-RawIP

People
Owner: Nobody in particular
Requestors: Peter.Sylvester [...] edelweb.fr
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.24



Subject: Segmentation fault caused by problem in RawIP.c function compile
Date: Wed, 05 Sep 2007 15:45:37 +0200
To: bug-Net-RawIP [...] rt.cpan.org
From: Peter Sylvester <Peter.Sylvester [...] edelweb.fr>
hello, The following function in Net::RawIP.xs seems to have a bug that may cause a segmentation fault. The Safefree routine frees the allocaled structure but later accesses to fp. The error happens later when setting a filter, libpcap thinks that the structuire has a length of one giga, whichg is probably some length of free area in the free list of the heap. Removing the call to Safefree solves the problem. I don't know whether there are memory leaks. Thanks for consideration Peter Sylvester int compile(p,fp,str,optimize,netmask) pcap_t * p struct bpf_program *fp char *str int optimize unsigned int netmask CODE: fp = (struct bpf_program *)safemalloc(sizeof(struct bpf_program)); RETVAL = pcap_compile(p,fp,str,optimize,netmask); Safefree(fp); OUTPUT: fp RETVAL
Download smime.p7s
application/x-pkcs7-signature 4.3k

Message body not shown because it is not plain text.

Hello, Peter.Sylvester wrote: Show quoted text
> The following function in Net::RawIP.xs seems to have a bug that > may cause a segmentation fault. The Safefree routine frees the > allocaled structure but later accesses to fp.
This problem is fixed in version 0.24. Thanks for submitting this ticket. -- Close the world, txEn eht nepO.