summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2006-09-04 20:12:45 +0000
committersam <sam@FreeBSD.org>2006-09-04 20:12:45 +0000
commit6bf6a28af37230c5ca61c232f2749a46397da00a (patch)
treeb2ac8cc2fed209e92f4b498b0935eead9bf91a66 /contrib/libpcap
parenta6a758d9f4a0eef22ccec65dd1dd468fdaa1f052 (diff)
downloadFreeBSD-src-6bf6a28af37230c5ca61c232f2749a46397da00a.zip
FreeBSD-src-6bf6a28af37230c5ca61c232f2749a46397da00a.tar.gz
sigh, put back buffer overflow fix of 1.1.11 that seems to have
not gone into the 0.9.4 release; don't put it on the vendor branch so we won't lose it on the next import if they continue to lose it
Diffstat (limited to 'contrib/libpcap')
-rw-r--r--contrib/libpcap/pcap-bpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/libpcap/pcap-bpf.c b/contrib/libpcap/pcap-bpf.c
index 97bd602..863827f 100644
--- a/contrib/libpcap/pcap-bpf.c
+++ b/contrib/libpcap/pcap-bpf.c
@@ -17,6 +17,8 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $FreeBSD$
*/
#ifndef lint
static const char rcsid[] _U_ =
@@ -746,7 +748,7 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
u_int i;
int is_ethernet;
- bdl.bfl_list = (u_int *) malloc(sizeof(u_int) * bdl.bfl_len + 1);
+ bdl.bfl_list = (u_int *) malloc(sizeof(u_int) * (bdl.bfl_len + 1));
if (bdl.bfl_list == NULL) {
(void)snprintf(ebuf, PCAP_ERRBUF_SIZE, "malloc: %s",
pcap_strerror(errno));
OpenPOWER on IntegriCloud