1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Build fixes

This commit is contained in:
dmiller
2025-04-10 19:24:22 +00:00
parent 5f6bc69983
commit 5b52e7a3f2
2 changed files with 4 additions and 2 deletions

View File

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

View File

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