mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Fix an off-by-one bug in TLS record parsing
This commit is contained in:
parent
ac863d6b10
commit
c87a4f1b3f
1 changed files with 2 additions and 1 deletions
|
|
@ -673,6 +673,7 @@ function record_read(buffer, i)
|
|||
b["extensions"] = {}
|
||||
j, num_exts = bin.unpack(">S", buffer, j)
|
||||
for e = 0, num_exts do
|
||||
if j >= msg_end then break end
|
||||
local extcode, datalen
|
||||
j, extcode = bin.unpack(">S", buffer, j)
|
||||
extcode = find_key(EXTENSIONS, extcode) or extcode
|
||||
|
|
@ -692,7 +693,7 @@ function record_read(buffer, i)
|
|||
end
|
||||
|
||||
-- Ignore unparsed bytes.
|
||||
j = len
|
||||
j = len+1
|
||||
|
||||
return j, h
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue