1
0
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:
dmiller
2025-06-09 18:38:59 +00:00
parent 2216e3856e
commit 4ed1ce0eee
5 changed files with 11 additions and 5 deletions

View File

@@ -1381,7 +1381,8 @@ static void nmap_mass_dns_core(DNS::Request *requests, int num_requests) {
nmap_set_nsock_logger();
nmap_adjust_loglevel(o.packetTrace());
nsock_pool_set_device(dnspool, o.device);
if (*o.device)
nsock_pool_set_device(dnspool, o.device);
if (o.proxy_chain)
nsock_pool_set_proxychain(dnspool, o.proxy_chain);