ssh/frames: avoid unsigned integer overflow

Fixes: 0b2ed97f36 ("ssh: frames support")
pull/11608/head
Philippe Antoine 7 months ago committed by Victor Julien
parent 6d8fbf364a
commit a673e1913b

@ -233,7 +233,8 @@ impl SSHState {
flow,
stream_slice,
input,
(head.pkt_len + 4) as i64,
// cast first to avoid unsigned integer overflow
(head.pkt_len as u64 + 4) as i64,
SshFrameType::RecordPdu as u8,
Some(0),
);

Loading…
Cancel
Save