From 6f6850707ad2d6dedd1c35eee2d0513c663b8184 Mon Sep 17 00:00:00 2001 From: bol-van Date: Sat, 14 Feb 2026 15:30:59 +0300 Subject: [PATCH] zapret-lib: tls_dissect abort 2 loops if data is corrupt --- lua/zapret-lib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/zapret-lib.lua b/lua/zapret-lib.lua index 4548755..4adcfe7 100644 --- a/lua/zapret-lib.lua +++ b/lua/zapret-lib.lua @@ -2468,7 +2468,7 @@ function tls_dissect(tls, offset, partialOK) -- 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 partialOK then return end - break + goto endrec end off = off + 5 + len len = tls_record_data_len(tls, off) @@ -2478,6 +2478,7 @@ function tls_dissect(tls, offset, partialOK) -- next record off = off + 5 + len end +::endrec:: if tdis.handshake then for htyp, handshake in pairs(tdis.handshake) do