We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a80d8f8 commit 7e9613cCopy full SHA for 7e9613c
src/mitm.rs
@@ -266,6 +266,11 @@ pub async fn pkt_modify_hook(
266
video_in_motion: bool,
267
ctx: &mut ModifyContext,
268
) -> Result<()> {
269
+ // if for some reason we have too small packet, bail out
270
+ if pkt.payload.len() < 2 {
271
+ return Ok(());
272
+ }
273
+
274
// message_id is the first 2 bytes of payload
275
let message_id: i32 = u16::from_be_bytes(pkt.payload[0..=1].try_into()?).into();
276
let data = &pkt.payload[2..]; // start of message data
0 commit comments