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 2006-01-16 20:33:23 +00:00
parent d1c1ca625a
commit bf281a32a1

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