diff options
author | Matt Caswell <matt@openssl.org> | 2015-02-03 16:11:49 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-26 15:02:00 +0000 |
commit | 5fb6f80cdfa418d9429f39f348d7bab8b5f9578a (patch) | |
tree | 451f349a2d00c382eafd8d729b8d35d8b829e504 /ssl/record | |
parent | cb2ce7abfd3e2e641851e0ed9dff1a883b38037e (diff) |
Fix seg fault in dtls1_new
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/record')
-rw-r--r-- | ssl/record/d1_pkt.c | 3 | ||||
-rw-r--r-- | ssl/record/s3_pkt.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ssl/record/d1_pkt.c b/ssl/record/d1_pkt.c index 5d0adb9c4e..e5a27883a7 100644 --- a/ssl/record/d1_pkt.c +++ b/ssl/record/d1_pkt.c @@ -133,8 +133,7 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) rl->d = d; - DTLS_RECORD_LAYER_clear(rl); - + d->unprocessed_rcds.q = pqueue_new(); d->processed_rcds.q = pqueue_new(); diff --git a/ssl/record/s3_pkt.c b/ssl/record/s3_pkt.c index 065ad94b08..30df2b741a 100644 --- a/ssl/record/s3_pkt.c +++ b/ssl/record/s3_pkt.c @@ -145,8 +145,10 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl) size_t rlen, wlen; int read_ahead; SSL *s; + DTLS_RECORD_LAYER *d; s = rl->s; + d = rl->d; read_ahead = rl->read_ahead; rp = SSL3_BUFFER_get_buf(&rl->rbuf); rlen = SSL3_BUFFER_get_len(&rl->rbuf); @@ -165,6 +167,10 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl) rl->read_ahead = read_ahead; rl->rstate = SSL_ST_READ_HEADER; rl->s = s; + rl->d = d; + + if(d) + DTLS_RECORD_LAYER_clear(rl); } void RECORD_LAYER_release(RECORD_LAYER *rl) |