mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19:02 +00:00
Fix NSE hangs when service sends non-matching data to receive_buf
This commit is contained in:
@@ -39,7 +39,7 @@ Helper = {
|
||||
if ( not(status) ) then
|
||||
return false, err
|
||||
end
|
||||
local status, data = self.socket:receive_buf("\n", false)
|
||||
local status, data = self.socket:receive_buf(match.pattern_limit("\n", 2048), false)
|
||||
if( not(status) ) then
|
||||
return false, err
|
||||
end
|
||||
@@ -119,7 +119,7 @@ Helper = {
|
||||
|
||||
local modules = {}
|
||||
while(true) do
|
||||
status, data = self.socket:receive_buf("\n", false)
|
||||
status, data = self.socket:receive_buf(match.pattern_limit("\n", 2048), false)
|
||||
if (not(status)) then
|
||||
return false, data
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user