1
0
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:
kris
2008-06-14 06:59:11 +00:00
parent e9a8e327b4
commit 47bc9d4c4f
3 changed files with 22 additions and 11 deletions

View File

@@ -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) {