summaryrefslogtreecommitdiffstats
path: root/ssl/d1_pkt.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-07-13 22:37:45 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-07-13 22:37:45 +0000
commit34d01a3b20860252c04df0197f95486d4ee8128e (patch)
treef5285099fe7b62e6d7bd3f6c5e7544c2a676ff9c /ssl/d1_pkt.c
parent856f3005def785e7f7319df6a8137c1c79c7b08e (diff)
PR: 1984
Submitted by: Michael Tüxen <Michael.Tuexen@lurchi.franken.de> Approved by: steve@openssl.org PR#1984 DTLS fix for 0.9.8.
Diffstat (limited to 'ssl/d1_pkt.c')
-rw-r--r--ssl/d1_pkt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index 26d5c3b1d2..989b5337b5 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -517,7 +517,12 @@ again:
/* read timeout is handled by dtls1_read_bytes */
if (n <= 0) return(n); /* error or non-blocking */
- OPENSSL_assert(s->packet_length == DTLS1_RT_HEADER_LENGTH);
+ /* this packet contained a partial record, dump it */
+ if (s->packet_length != DTLS1_RT_HEADER_LENGTH)
+ {
+ s->packet_length = 0;
+ goto again;
+ }
s->rstate=SSL_ST_READ_BODY;