diff options
author | Parménides GV <parmegv@sdf.org> | 2014-11-25 13:19:21 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-11-25 13:19:21 +0100 |
commit | 576b0c26baf9b5b1418650a572604325ca7fb3af (patch) | |
tree | 8b2986d66ed4e6bdf5a3253c81f32cc5a8e53b99 /app/openssl/ssl/d1_both.c | |
parent | bbf877a099112acbf34589b01503c3f5ee135dc0 (diff) | |
parent | 48cd0f2fa3094b5a6b7b07d6413d77bdbc9bbc20 (diff) |
Merge branch 'develop'0.8.0
Diffstat (limited to 'app/openssl/ssl/d1_both.c')
-rw-r--r-- | app/openssl/ssl/d1_both.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/openssl/ssl/d1_both.c b/app/openssl/ssl/d1_both.c index 2e8cf681..04aa2310 100644 --- a/app/openssl/ssl/d1_both.c +++ b/app/openssl/ssl/d1_both.c @@ -627,7 +627,16 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) frag->msg_header.frag_off = 0; } 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. @@ -674,8 +683,8 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) item = pitem_new(seq64be, frag); if (item == NULL) { - goto err; i = -1; + goto err; } pqueue_insert(s->d1->buffered_messages, item); @@ -784,6 +793,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok) int i,al; struct hm_header_st msg_hdr; + redo: /* see if we have the required fragment already */ if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok) { @@ -842,8 +852,7 @@ dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, int *ok) s->msg_callback_arg); s->init_num = 0; - return dtls1_get_message_fragment(s, st1, stn, - max, ok); + goto redo; } else /* Incorrectly formated Hello request */ { |