Re: [tcpdump-workers] Buffer overwrites with pcap_next_ex

2009-02-15 Thread Andreas Rieke
Hi, thank you very much, I was already despairing of that issue, best regards, Andreas Guy Harris schrieb: > > On Jan 25, 2009, at 2:05 AM, Andreas Rieke wrote: > >> I have forgotten to mention that I use libpcap 1.0.0. > > ...which means that, at least on Linux, libpcap's probably using t

Re: [tcpdump-workers] Buffer overwrites with pcap_next_ex

2009-02-15 Thread Michael Bernstein
395 CISSP, CCNP, JNCIS, PMP, IAM GCIA, GCIH, GCFW, GSEC, CCSE+ NSA, MCAD C# Core, MCP, CNE --- On Sat, 2/14/09, Guy Harris wrote: From: Guy Harris Subject: Re: [tcpdump-workers] Buffer overwrites with pcap_next_ex To: tcpdump-workers@lists.tcpdump.org Cc: "KT" Date: Saturday, Februar

Re: [tcpdump-workers] Buffer overwrites with pcap_next_ex

2009-02-14 Thread Guy Harris
On Jan 25, 2009, at 2:05 AM, Andreas Rieke wrote: I have forgotten to mention that I use libpcap 1.0.0. ...which means that, at least on Linux, libpcap's probably using the memory-mapped interface... Since I placed a debug output before and after each call to pcap, I am very sure that no

Re: [tcpdump-workers] Buffer overwrites with pcap_next_ex

2009-01-26 Thread Andreas Rieke
Hi, I have forgotten to mention that I use libpcap 1.0.0. Guy Harris schrieb: > > On Jan 24, 2009, at 6:36 AM, Andreas Rieke wrote: > >> I have seen a strange behavior of pcap_next_ex where a buffer is >> overwritten. When pcap_next_ex has finished, it returns a buffer for the >> packet header

Re: [tcpdump-workers] Buffer overwrites with pcap_next_ex

2009-01-24 Thread Guy Harris
On Jan 24, 2009, at 11:01 AM, Guy Harris wrote: No. pcap_next_ex() returns a pointer to a packet header and a pointer to packet data. These are, in fact, pointers to a structure internal to libpcap and a buffer internal to libpcap, respectively Make that "a pointer to a structure intern

Re: [tcpdump-workers] Buffer overwrites with pcap_next_ex

2009-01-24 Thread Guy Harris
On Jan 24, 2009, at 6:36 AM, Andreas Rieke wrote: I have seen a strange behavior of pcap_next_ex where a buffer is overwritten. When pcap_next_ex has finished, it returns a buffer for the packet header and one for the packet data. No. pcap_next_ex() returns a pointer to a packet header an

[tcpdump-workers] Buffer overwrites with pcap_next_ex

2009-01-24 Thread Andreas Rieke
Hi, I have seen a strange behavior of pcap_next_ex where a buffer is overwritten. When pcap_next_ex has finished, it returns a buffer for the packet header and one for the packet data. When processing the packet data, I have often seen strange data. For that reason, I have changed my code to copy