From 9e77964022800d4a41ecfe374b65598eb32e9ed1 Mon Sep 17 00:00:00 2001 From: nnposter Date: Mon, 20 Aug 2018 01:10:32 +0000 Subject: [PATCH] Removes redundant error check --- nselib/mssql.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nselib/mssql.lua b/nselib/mssql.lua index 297519169..dc1c809b7 100644 --- a/nselib/mssql.lua +++ b/nselib/mssql.lua @@ -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" )