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:
@@ -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" : \
|
||||
|
||||
Reference in New Issue
Block a user