1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 05:09:14 +00:00

Avoid a crash when host has no domain configured

This commit is contained in:
dmiller
2016-05-23 04:30:05 +00:00
parent adfe806099
commit 5be0ac591b

View File

@@ -151,7 +151,10 @@ local function dnsDiscover()
-- first get all unique domain names
if ( not(name:match("in%-addr.arpa$")) ) then
local domain = name:match("^[^%.]-%.(.*)$")
domains[domain] = true
-- Check that the name has a domain component
if domain then
domains[domain] = true
end
end
end