mirror of
https://github.com/bol-van/zapret2.git
synced 2026-03-14 06:13:09 +00:00
zapret-lib: tls_dissect abort 2 loops if data is corrupt
This commit is contained in:
@@ -2468,7 +2468,7 @@ function tls_dissect(tls, offset, partialOK)
|
|||||||
-- next record
|
-- next record
|
||||||
if not is_tls_record(tls, off + 5 + len, nil, partialOK) or tls_record_type(tls, off + 5 + len) ~= typ then
|
if not is_tls_record(tls, off + 5 + len, nil, partialOK) or tls_record_type(tls, off + 5 + len) ~= typ then
|
||||||
if not partialOK then return end
|
if not partialOK then return end
|
||||||
break
|
goto endrec
|
||||||
end
|
end
|
||||||
off = off + 5 + len
|
off = off + 5 + len
|
||||||
len = tls_record_data_len(tls, off)
|
len = tls_record_data_len(tls, off)
|
||||||
@@ -2478,6 +2478,7 @@ function tls_dissect(tls, offset, partialOK)
|
|||||||
-- next record
|
-- next record
|
||||||
off = off + 5 + len
|
off = off + 5 + len
|
||||||
end
|
end
|
||||||
|
::endrec::
|
||||||
|
|
||||||
if tdis.handshake then
|
if tdis.handshake then
|
||||||
for htyp, handshake in pairs(tdis.handshake) do
|
for htyp, handshake in pairs(tdis.handshake) do
|
||||||
|
|||||||
Reference in New Issue
Block a user