correct dlt buffer alloc; this goes on the vendor branch as it

will be committed there shortly

MFC after:	3 days
This commit is contained in:
Sam Leffler 2006-01-16 20:33:23 +00:00
parent ee2dd488bf
commit 04679efc46
1 changed files with 1 additions and 1 deletions

View File

@ -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));