[Winpcap-users] BUG rpcapd - inproper internal structure pcap_t usage

Tomas Konir Tomas.Konir at liberouter.org
Wed Apr 28 02:31:51 PDT 2010


rpcapd use pcap-int.h and than directly pcap_t structure.
size of pcap_t and position of individual fields is not independent
and depends on config.h generated by configure.
The result is rewritten memory and bugs like: socket error, invalid socket,
SIGSEGV and similar.

I tried to remove usage of internal pcap_t structure and use rpcapd owns.

Patch is attached, and i have two notes.

1. timezone is set to zero (but no code in libpcap/winpcap use it)
2. bufsize is set to snaplen instead of internal pcap_t->bufsize.

MOJE

P.S. another way would by use config.h from libpcap, but i don't prefer it.


-- 
Tomas Konir
Prague
Czech Republic
ICQ:      25849167
Jabber: Tomas.Konir at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20100428/93943fb1/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dont-use-internal-pcap_t.diff
Type: application/octet-stream
Size: 14110 bytes
Desc: not available
Url : http://www.winpcap.org/pipermail/winpcap-users/attachments/20100428/93943fb1/attachment-0001.obj 


More information about the Winpcap-users mailing list