From 04679efc461cf40fcd2f0d0c54918307fb25f037 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Mon, 16 Jan 2006 20:33:23 +0000 Subject: [PATCH] correct dlt buffer alloc; this goes on the vendor branch as it will be committed there shortly MFC after: 3 days --- contrib/libpcap/pcap-bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/libpcap/pcap-bpf.c b/contrib/libpcap/pcap-bpf.c index ccf9d732828..4a94cda6219 100644 --- a/contrib/libpcap/pcap-bpf.c +++ b/contrib/libpcap/pcap-bpf.c @@ -746,7 +746,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));