1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Don't use strict inequality with MAX_LINK_HEADERSZ.

DLT_IPNET is equal to this.
This commit is contained in:
david
2011-09-29 22:23:14 +00:00
parent f0d97d0e9a
commit 91b7aa2d5f

View File

@@ -1653,7 +1653,7 @@ char *readip_pcap(pcap_t *pd, unsigned int *len, long to_usec,
if (offset && linknfo) {
linknfo->datalinktype = datalink;
linknfo->headerlen = offset;
assert(offset < MAX_LINK_HEADERSZ);
assert(offset <= MAX_LINK_HEADERSZ);
memcpy(linknfo->header, p, MIN(sizeof(linknfo->header), offset));
}
p += offset;