mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Build fixes
This commit is contained in:
@@ -137,6 +137,8 @@ typedef unsigned __int8 u_int8_t;
|
|||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#define NBASE_MAX_ERR_STR_LEN 1024 /* Max length of an error message */
|
#define NBASE_MAX_ERR_STR_LEN 1024 /* Max length of an error message */
|
||||||
|
|
||||||
#ifndef PCAP_NETMASK_UNKNOWN
|
#ifndef PCAP_NETMASK_UNKNOWN
|
||||||
|
|||||||
@@ -478,8 +478,8 @@ void nse_readpcap(nsock_event nsev, const unsigned char **l2_data, size_t *l2_le
|
|||||||
|
|
||||||
l2l = mp->l3_offset;
|
l2l = mp->l3_offset;
|
||||||
if (mp->datalink == DLT_EN10MB
|
if (mp->datalink == DLT_EN10MB
|
||||||
&& n->caplen >= sizeof(struct eth_hdr)
|
&& n->caplen >= 14 /* size of ethernet header */
|
||||||
&& 0 == memcmp(n->packet + offsetof(struct eth_hdr, eth_type), "\x81\x00", 2))
|
&& 0 == memcmp(n->packet + 12 /* offset of eth_type */, "\x81\x00", 2)) {
|
||||||
l2l += 4;
|
l2l += 4;
|
||||||
}
|
}
|
||||||
if (l2l > n->caplen)
|
if (l2l > n->caplen)
|
||||||
|
|||||||
Reference in New Issue
Block a user