1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Avoid a crash when the IP contains a colon but no hextets

This commit is contained in:
nnposter
2025-10-27 01:19:40 +00:00
parent 4f7c92fbac
commit d2d591ce0c

View File

@@ -381,6 +381,9 @@ expand_ip = function( ip, family )
for hdt in string.gmatch( ip, "[%.z%x]+" ) do
hexadectets[#hexadectets+1] = hdt
end
if #hexadectets == 0 then
return nil, ( err4:gsub( "IPv4", "IPv6" ) )
end
-- deal with IPv4in6 (last hexadectet only)
local t = {}