mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Fixing more bugs reported by Ilja, mostly bounds checking
This commit is contained in:
parent
e9a8e327b4
commit
47bc9d4c4f
3 changed files with 22 additions and 11 deletions
|
|
@ -2426,7 +2426,7 @@ bool HostOsScan::processTUdpResp(HostOsScanStats *hss, struct ip *ip) {
|
|||
assert(icmp->icmp_type == 3 && icmp->icmp_code == 3);
|
||||
|
||||
ip2 = (struct ip*)((char *)icmp + 8);
|
||||
udp = (struct udp_hdr *)((char *)ip2 + 4 * ip->ip_hl);
|
||||
udp = (struct udp_hdr *)((char *)ip2 + 4 * ip2->ip_hl);
|
||||
|
||||
/* The ports should match. */
|
||||
if (ntohs(udp->uh_sport) != hss->upi.sport || ntohs(udp->uh_dport) != hss->upi.dport) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue