1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00

Fix off-by-one overflow in the IP protocol table.

Fixes #2896, closes #2897, closes #2900
This commit is contained in:
nnposter
2024-08-08 01:31:06 +00:00
parent 667527c4b4
commit efa0dc36f2
5 changed files with 17 additions and 12 deletions

View File

@@ -79,6 +79,8 @@ int addprotocolsfromservmask(char *mask, u8 *porttbl);
const struct nprotoent *nmap_getprotbynum(int num);
const struct nprotoent *nmap_getprotbyname(const char *name);
#define MAX_IPPROTONUM 255
#define MAX_IPPROTOSTRLEN 4
#define IPPROTO2STR(p) \
((p)==IPPROTO_TCP ? "tcp" : \