mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Applied Sebastian Dragomir's patch for the "Unbounded memory use" bug reported
by David Fifield http://seclists.org/nmap-dev/2011/q2/451
This commit is contained in:
parent
9d52d1290f
commit
19da29942c
7 changed files with 7 additions and 7 deletions
|
|
@ -767,7 +767,7 @@ DB2Socket = {
|
|||
|
||||
if ( #self.Buffer < count ) then
|
||||
status, data = self.Socket:receive_bytes( count - #self.Buffer )
|
||||
if ( not(status) ) then
|
||||
if ( not(status) or #data < count - #self.Buffer ) then
|
||||
return false, data
|
||||
end
|
||||
self.Buffer = self.Buffer .. data
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ Socket =
|
|||
|
||||
if ( #self.Buffer < count ) then
|
||||
status, data = self.Socket:receive_bytes( count - #self.Buffer )
|
||||
if ( not(status) ) then
|
||||
if ( not(status) or #data < count - #self.Buffer ) then
|
||||
return false, data
|
||||
end
|
||||
self.Buffer = self.Buffer .. data
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ Socket =
|
|||
|
||||
if ( #self.Buffer < count ) then
|
||||
status, data = self.Socket:receive_bytes( count - #self.Buffer )
|
||||
if ( not(status) ) then
|
||||
if ( not(status) or #data < count - #self.Buffer ) then
|
||||
return false, data
|
||||
end
|
||||
self.Buffer = self.Buffer .. data
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ Socket =
|
|||
|
||||
if ( #self.Buffer < count ) then
|
||||
status, data = self.Socket:receive_bytes( count - #self.Buffer )
|
||||
if ( not(status) ) then
|
||||
if ( not(status) or #data < count - #self.Buffer ) then
|
||||
return false, data
|
||||
end
|
||||
self.Buffer = self.Buffer .. data
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ DominoSocket =
|
|||
|
||||
if ( #self.Buffer < count ) then
|
||||
status, data = self.Socket:receive_bytes( count - #self.Buffer )
|
||||
if ( not(status) ) then
|
||||
if ( not(status) or #data < count - #self.Buffer ) then
|
||||
return false, data
|
||||
end
|
||||
self.Buffer = self.Buffer .. data
|
||||
|
|
|
|||
|
|
@ -1205,7 +1205,7 @@ TNSSocket =
|
|||
|
||||
if ( #self.Buffer < count ) then
|
||||
status, data = self.Socket:receive_bytes( count - #self.Buffer )
|
||||
if ( not(status) ) then
|
||||
if ( not(status) or #data < count - #self.Buffer ) then
|
||||
return false, data
|
||||
end
|
||||
self.Buffer = self.Buffer .. data
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ VNCSocket =
|
|||
|
||||
if ( #self.Buffer < count ) then
|
||||
status, data = self.Socket:receive_bytes( count - #self.Buffer )
|
||||
if ( not(status) ) then
|
||||
if ( not(status) or #data < count - #self.Buffer ) then
|
||||
return false, data
|
||||
end
|
||||
self.Buffer = self.Buffer .. data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue