1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 15:09:02 +00:00

Check some libdnet mallocs for failure.

Patch based on one by Bill Parker.
http://seclists.org/nmap-dev/2012/q4/261
This commit is contained in:
david
2012-11-22 00:50:18 +00:00
parent f4ff002c71
commit f602ead419
3 changed files with 53 additions and 0 deletions

View File

@@ -108,6 +108,8 @@ arp_loop(arp_t *arp, arp_handler callback, void *arg)
if (arp->iptable)
free(arp->iptable);
arp->iptable = malloc(len);
if (arp->iptable == NULL)
return (-1);
ret = GetIpNetTable(arp->iptable, &len, FALSE);
if (ret == NO_ERROR)
break;