File openssl-CAN-2004-0079.dif of Package compat-openssl096g

diff -ur -x CVS openssl7/ssl/s3_pkt.c ossl7/ssl/s3_pkt.c
--- openssl7/ssl/s3_pkt.c	2003-02-19 12:04:16.000000000 +0000
+++ ossl7/ssl/s3_pkt.c	2004-02-02 01:10:12.000000000 +0000
@@ -1085,6 +1085,14 @@
 			goto err;
 			}
 
+		/* Check we have a cipher to change to */
+		if (s->s3->tmp.new_cipher == NULL)
+			{
+			i=SSL_AD_UNEXPECTED_MESSAGE;
+			SSLerr(SSL_F_SSL3_GET_CERT_VERIFY,SSL_R_CCS_RECEIVED_EARLY);
+			goto err;
+			}
+
 		rr->length=0;
 
 		if (s->msg_callback)