mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid passing empty string to nsock_pool_set_device
Nsock checks for NULL, but not for empty string. Rather than making Nsock decide, each app will decide whether to call nsock_pool_set_device, with all currently skipping the call if device is an empty string.
This commit is contained in:
@@ -139,7 +139,8 @@ void FPNetworkControl::init(const char *ifname, devtype iftype) {
|
||||
nmap_set_nsock_logger();
|
||||
nmap_adjust_loglevel(o.packetTrace());
|
||||
|
||||
nsock_pool_set_device(nsp, o.device);
|
||||
if (*o.device)
|
||||
nsock_pool_set_device(nsp, o.device);
|
||||
|
||||
if (o.proxy_chain)
|
||||
nsock_pool_set_proxychain(this->nsp, o.proxy_chain);
|
||||
|
||||
Reference in New Issue
Block a user