Skip to content

Commit

Permalink
Do not panic on too mange DTLS fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Apr 23, 2024
1 parent 429b2b8 commit fdf3420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dtls_combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn combine_dtls_fragments<'a>(
}

if fragments.len() > MAX_FRAGMENTS {
panic!("More than max fragments");
return Err(Err::Error(make_error(&*out, ErrorKind::TooLarge)));
}

const MESSAGE_HEADER_OFFSET: usize = 12;
Expand Down

0 comments on commit fdf3420

Please sign in to comment.