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

Removes redundant error check

This commit is contained in:
nnposter
2018-08-20 01:10:32 +00:00
parent 0500b2ce42
commit 9e77964022

View File

@@ -1703,12 +1703,6 @@ PreLoginPacket =
optionPos, optionLength, pos = (">I2I2"):unpack(bytes, pos)
optionPos = optionPos + 1 -- convert from 0-based index to 1-based index
if ( (optionPos + optionLength) > (#bytes + 1) ) then
stdnse.debug2("%s: Pre-login response: pos+len for option type %s is beyond end of data.", "MSSQL", optionType )
stdnse.debug2("%s: (optionPos: %s) (optionLength: %s)", "MSSQL", optionPos, optionLength )
return false, "Invalid pre-login response"
end
if ( optionLength ~= expectedOptionLength and expectedOptionLength ~= -1 ) then
stdnse.debug2("%s: Option data is incorrect size in pre-login response. ", "MSSQL" )