mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Check for tcp th_off < 5
This commit is contained in:
parent
4651a54b4b
commit
b5c54d9687
1 changed files with 2 additions and 1 deletions
|
|
@ -1908,7 +1908,8 @@ bool HostOsScan::processResp(HostOsScanStats *hss, const u8 *pkt, unsigned int l
|
|||
if (len < sizeof(tcp))
|
||||
return false;
|
||||
memcpy(&tcp, l4pkt, sizeof(tcp));
|
||||
if (len < (unsigned int)(4 * tcp.th_off))
|
||||
const unsigned int tcphlen = 4 * tcp.th_off;
|
||||
if (tcphlen < sizeof(tcp) || len < tcphlen)
|
||||
return false;
|
||||
testno = ntohs(tcp.th_dport) - tcpPortBase;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue