File openssl-CVE-2009-1379.patch of Package openssl-0.9.8k

Index: openssl-0.9.8h/ssl/d1_both.c
===================================================================
--- openssl-0.9.8h.orig/ssl/d1_both.c
+++ openssl-0.9.8h/ssl/d1_both.c
@@ -519,6 +519,8 @@ dtls1_retrieve_buffered_fragment(SSL *s,
 
 	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 +538,7 @@ dtls1_retrieve_buffered_fragment(SSL *s,
 		if (al==0)
 			{
 			*ok = 1;
-			return frag->msg_header.frag_len;
+			return frag_len;
 			}
 
 		ssl3_send_alert(s,SSL3_AL_FATAL,al);