Skip to content

Commit a07e5d5

Browse files
guedougg-gvaladongpotter2
authored
Fix crash with StreamSocket and TLS (#4535)
Co-authored-by: Guillaume Valadon <[email protected]> Co-authored-by: gpotter2 <[email protected]>
1 parent bf8652b commit a07e5d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scapy/layers/tls/session.py

+2
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,8 @@ def tcp_reassemble(cls, data, metadata, session):
11671167
length = struct.unpack("!H", data[3:5])[0] + 5
11681168
if len(data) >= length:
11691169
# get the underlayer as it is used to populate tls_session
1170+
if "original" not in metadata:
1171+
return cls(data)
11701172
underlayer = metadata["original"][TCP].copy()
11711173
underlayer.remove_payload()
11721174
# eventually get the tls_session now for TLS.dispatch_hook

0 commit comments

Comments
 (0)