Fixed a bug in --data-length parsing. User input was not being checked and in some cases that resulted in useless buffer allocations and unpredictable payload lengths. Check http://seclists.org/nmap-dev/2009/q2/0763.html for a complete description of the problem.

This commit is contained in:
luis 2009-07-04 21:15:13 +00:00
parent 7da44a92ef
commit 98aedb8d1c
2 changed files with 11 additions and 7 deletions

4
nmap.h
View file

@ -399,6 +399,10 @@ void *realloc();
#define MAXHOSTNAMELEN 64
#endif
/* Max payload: Worst case is IPv4 with 40bytes of options and TCP with 20
* bytes of options. */
#define MAX_PAYLOAD_ALLOWED 65535-60-40
#ifndef recvfrom6_t
# define recvfrom6_t int
#endif