Skip to content

Commit fdf3420

Browse files
committed
Do not panic on too mange DTLS fragments
1 parent 429b2b8 commit fdf3420

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dtls_combine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn combine_dtls_fragments<'a>(
3333
}
3434

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

3939
const MESSAGE_HEADER_OFFSET: usize = 12;

0 commit comments

Comments
 (0)