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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user