mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 20:39:02 +00:00
Fixing more bugs reported by Ilja, mostly bounds checking
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user