mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Use signed value for tcp header offset and option lengths to detect underflow
This commit is contained in:
2
tcpip.cc
2
tcpip.cc
@@ -1352,7 +1352,7 @@ int readudppacket(const u8 *packet, int readdata) {
|
||||
The options checked are MSS, WScale, SackOK, Sack, and Timestamp. */
|
||||
static bool validateTCPhdr(const u8 *tcpc, unsigned len) {
|
||||
struct tcp_hdr *tcp = (struct tcp_hdr *) tcpc;
|
||||
unsigned hdrlen, optlen;
|
||||
int hdrlen, optlen;
|
||||
|
||||
hdrlen = tcp->th_off * 4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user