mirror of
https://github.com/nmap/nmap.git
synced 2026-09-21 07:38:39 +00:00
Use signed value for tcp header offset and option lengths to detect underflow
This commit is contained in:
parent
b8c8fe8047
commit
3521f15180
1 changed files with 1 additions and 1 deletions
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue