mirror of
https://github.com/nmap/nmap.git
synced 2025-12-12 10:49:02 +00:00
Don't use strict inequality with MAX_LINK_HEADERSZ.
DLT_IPNET is equal to this.
This commit is contained in:
2
tcpip.cc
2
tcpip.cc
@@ -1653,7 +1653,7 @@ char *readip_pcap(pcap_t *pd, unsigned int *len, long to_usec,
|
|||||||
if (offset && linknfo) {
|
if (offset && linknfo) {
|
||||||
linknfo->datalinktype = datalink;
|
linknfo->datalinktype = datalink;
|
||||||
linknfo->headerlen = offset;
|
linknfo->headerlen = offset;
|
||||||
assert(offset < MAX_LINK_HEADERSZ);
|
assert(offset <= MAX_LINK_HEADERSZ);
|
||||||
memcpy(linknfo->header, p, MIN(sizeof(linknfo->header), offset));
|
memcpy(linknfo->header, p, MIN(sizeof(linknfo->header), offset));
|
||||||
}
|
}
|
||||||
p += offset;
|
p += offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user