summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/ssl/d1_both.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/src/ssl/d1_both.c')
-rw-r--r--lib/libssl/src/ssl/d1_both.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libssl/src/ssl/d1_both.c b/lib/libssl/src/ssl/d1_both.c
index 8e2843625b8..3674ed60461 100644
--- a/lib/libssl/src/ssl/d1_both.c
+++ b/lib/libssl/src/ssl/d1_both.c
@@ -586,8 +586,14 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr));
frag->msg_header.frag_len = frag->msg_header.msg_len;
frag->msg_header.frag_off = 0;
- } else
+ } else {
frag = (hm_fragment*)item->data;
+ if (frag->msg_header.msg_len != msg_hdr->msg_len) {
+ item = NULL;
+ frag = NULL;
+ goto err;
+ }
+ }
/* If message is already reassembled, this must be a
* retransmit and can be dropped.