summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libssl/d1_both.c9
-rw-r--r--src/lib/libssl/src/ssl/d1_both.c9
2 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c
index fea701107f..1eda4aef72 100644
--- a/src/lib/libssl/d1_both.c
+++ b/src/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_both.c,v 1.27 2014/08/07 20:24:12 guenther Exp $ */ 1/* $OpenBSD: d1_both.c,v 1.28 2014/08/08 05:06:56 guenther Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -597,6 +597,11 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
597 msg_hdr->msg_len > dtls1_max_handshake_message_len(s)) 597 msg_hdr->msg_len > dtls1_max_handshake_message_len(s))
598 goto err; 598 goto err;
599 599
600 if (frag_len == 0) {
601 i = DTLS1_HM_FRAGMENT_RETRY;
602 goto err;
603 }
604
600 /* Try to find item in queue */ 605 /* Try to find item in queue */
601 memset(seq64be, 0, sizeof(seq64be)); 606 memset(seq64be, 0, sizeof(seq64be));
602 seq64be[6] = (unsigned char)(msg_hdr->seq >> 8); 607 seq64be[6] = (unsigned char)(msg_hdr->seq >> 8);
@@ -725,7 +730,7 @@ dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
725 frag_len -= i; 730 frag_len -= i;
726 } 731 }
727 } else { 732 } else {
728 if (frag_len && frag_len < msg_hdr->msg_len) 733 if (frag_len < msg_hdr->msg_len)
729 return dtls1_reassemble_fragment(s, msg_hdr, ok); 734 return dtls1_reassemble_fragment(s, msg_hdr, ok);
730 735
731 if (frag_len > dtls1_max_handshake_message_len(s)) 736 if (frag_len > dtls1_max_handshake_message_len(s))
diff --git a/src/lib/libssl/src/ssl/d1_both.c b/src/lib/libssl/src/ssl/d1_both.c
index fea701107f..1eda4aef72 100644
--- a/src/lib/libssl/src/ssl/d1_both.c
+++ b/src/lib/libssl/src/ssl/d1_both.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_both.c,v 1.27 2014/08/07 20:24:12 guenther Exp $ */ 1/* $OpenBSD: d1_both.c,v 1.28 2014/08/08 05:06:56 guenther Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -597,6 +597,11 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
597 msg_hdr->msg_len > dtls1_max_handshake_message_len(s)) 597 msg_hdr->msg_len > dtls1_max_handshake_message_len(s))
598 goto err; 598 goto err;
599 599
600 if (frag_len == 0) {
601 i = DTLS1_HM_FRAGMENT_RETRY;
602 goto err;
603 }
604
600 /* Try to find item in queue */ 605 /* Try to find item in queue */
601 memset(seq64be, 0, sizeof(seq64be)); 606 memset(seq64be, 0, sizeof(seq64be));
602 seq64be[6] = (unsigned char)(msg_hdr->seq >> 8); 607 seq64be[6] = (unsigned char)(msg_hdr->seq >> 8);
@@ -725,7 +730,7 @@ dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
725 frag_len -= i; 730 frag_len -= i;
726 } 731 }
727 } else { 732 } else {
728 if (frag_len && frag_len < msg_hdr->msg_len) 733 if (frag_len < msg_hdr->msg_len)
729 return dtls1_reassemble_fragment(s, msg_hdr, ok); 734 return dtls1_reassemble_fragment(s, msg_hdr, ok);
730 735
731 if (frag_len > dtls1_max_handshake_message_len(s)) 736 if (frag_len > dtls1_max_handshake_message_len(s))