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

Avoid comparing nil with an integer, potentially

This commit is contained in:
dmiller
2014-12-18 00:22:42 +00:00
parent 31ba95b918
commit 8e8935d2c0

View File

@@ -104,7 +104,7 @@ action = function(host, port)
local http_server = string.match(result, "\n[Ss][Ee][Rr][Vv][Ee][Rr]:%s*(.-)\r?\n")
-- Avoid setting version info if -sV scan already got a match
if port.version.product == nil and port.version.name_confidence <= 3 then
if port.version.product == nil and (port.version.name_confidence or 0) <= 3 then
port.version.product = http_server
-- Setting "softmatched" allows the service fingerprint to be printed
nmap.set_port_version(host, port, "softmatched")