dect
/
libpcap
Archived
13
0
Fork 0

From John Bankier <jbankier@rainfinity.com>: the buffer into which we

read packets is "p->bufsize" bytes long, not MAXDLBUF bytes long
("p->bufsize" is set to (MAXDLBUF * sizeof sizeof(bpf_u_int32))), so
supply that as the "maxlen" value in the "data" argument to "getmsg()".
This commit is contained in:
guy 2002-03-05 04:05:56 +00:00
parent c9f3b70d22
commit 0c86142e99
2 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@ Additional people who have contributed patches:
Jason R. Thorpe <thorpej@zembu.com>
Javier Achirica <achirica@ttd.net>
Jefferson Ogata <jogata@nodc.noaa.gov>
John Bankier <jbankier@rainfinity.com>
Juergen Schoenwaelder <schoenw@ibr.cs.tu-bs.de>
Klaus Klein <kleink@netbsd.org>
Lorenzo Cavallaro <sullivan@sikurezza.org>

View File

@ -38,7 +38,7 @@
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.75 2002-02-22 11:49:13 guy Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.76 2002-03-05 04:05:56 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -177,7 +177,7 @@ pcap_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
cc = p->cc;
if (cc == 0) {
data.buf = (char *)p->buffer + p->offset;
data.maxlen = MAXDLBUF;
data.maxlen = p->bufsize;
data.len = 0;
do {
if (getmsg(p->fd, &ctl, &data, &flags) < 0) {