From: Dr. Stephen Henson Date: Wed, 1 Jul 2009 11:29:01 +0000 (+0000) Subject: PR: 1962 X-Git-Tag: OpenSSL_1_0_0-beta3~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2b3cd246e5680c3842f04ff014fbe149bc1878b9;p=oweals%2Fopenssl.git PR: 1962 Submitted by: Daniel Mentz Reviewed by: steve@openssl.org Fix "for dtls1_get_record() returns a bad record in one edge case" bug. --- diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 394daf6258..35e83d8b52 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -623,6 +623,7 @@ again: /* this packet contained a partial record, dump it */ if ( n != i) { + rr->length = 0; s->packet_length = 0; goto again; } @@ -636,6 +637,7 @@ again: bitmap = dtls1_get_bitmap(s, rr, &is_next_epoch); if ( bitmap == NULL) { + rr->length = 0; s->packet_length = 0; /* dump this record */ goto again; /* get another record */ } @@ -660,6 +662,7 @@ again: { dtls1_record_bitmap_update(s, bitmap); dtls1_buffer_record(s, &(s->d1->unprocessed_rcds), rr->seq_num); + rr->length = 0; s->packet_length = 0; goto again; }