From: Dr. Stephen Henson Date: Wed, 13 May 2009 11:51:30 +0000 (+0000) Subject: PR: 1923 X-Git-Tag: OpenSSL_1_0_0-beta3~91 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=561cbe567846a376153bea7f1f2d061e78029c2d;p=oweals%2Fopenssl.git PR: 1923 Submitted by: Daniel Mentz , Robin Seggelmann Approved by: steve@openssl.org Don't access freed data structure. --- diff --git a/ssl/d1_both.c b/ssl/d1_both.c index ffbe5131d7..8883760da5 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -519,6 +519,7 @@ dtls1_retrieve_buffered_fragment(SSL *s, long max, int *ok) if ( s->d1->handshake_read_seq == frag->msg_header.seq) { + unsigned long frag_len = frag->msg_header.frag_len; pqueue_pop(s->d1->buffered_messages); al=dtls1_preprocess_fragment(s,&frag->msg_header,max); @@ -536,7 +537,7 @@ dtls1_retrieve_buffered_fragment(SSL *s, long max, int *ok) if (al==0) { *ok = 1; - return frag->msg_header.frag_len; + return frag_len; } ssl3_send_alert(s,SSL3_AL_FATAL,al);