mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Fix off-by-one overflow in the IP protocol table.
Fixes #2896, closes #2897, closes #2900
This commit is contained in:
parent
667527c4b4
commit
efa0dc36f2
5 changed files with 17 additions and 12 deletions
|
|
@ -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" : \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue