diff options
author | guy <guy> | 2002-03-05 04:07:35 +0000 |
---|---|---|
committer | guy <guy> | 2002-03-05 04:07:35 +0000 |
commit | 07654646e6dc7ffe4181ca0e7d9e78de0014701a (patch) | |
tree | 2f578f1883c646d6a1de0effac112930c825202b | |
parent | 3d59b46ff119d4b2b3d9e88cdc2fa31a24044ca5 (diff) | |
download | libpcap-07654646e6dc7ffe4181ca0e7d9e78de0014701a.tar.gz |
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()".
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | pcap-dlpi.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -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> diff --git a/pcap-dlpi.c b/pcap-dlpi.c index 16f24b53..4d5a9af9 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -38,7 +38,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.74.2.1 2002-02-22 11:49:42 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.74.2.2 2002-03-05 04:07:36 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) { |