mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Fixing another possible NULL dereference, this time in readTraceResponses() in traceroute.cc. Any replies at all are apparently counted below this section of code, and there is no else case to go with this if and else if, so I figure I'll just let it go false so it goes along with any other abnormal responses. Found with Coverity, CID 28.
This commit is contained in:
parent
7f1654e3ac
commit
66064ad778
1 changed files with 1 additions and 1 deletions
|
|
@ -444,7 +444,7 @@ Traceroute::readTraceResponses () {
|
|||
if (tp->ipreplysrc.s_addr)
|
||||
break;
|
||||
|
||||
if ((tg->proto == IPPROTO_UDP && ip2->ip_p == IPPROTO_UDP) ||
|
||||
if ((tg->proto == IPPROTO_UDP && (ip2 && ip2->ip_p == IPPROTO_UDP)) ||
|
||||
(icmp->icmp_type == ICMP_DEST_UNREACH)) {
|
||||
switch (icmp->icmp_code) {
|
||||
/* reply from a closed port */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue