summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2004-03-17 12:28:30 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2004-03-17 12:28:30 +0000
commit23b1f8a83124eed725ec89da07ae896563f368a3 (patch)
treee69f0e29c51d6562c3c107fb0cfa0a9c2ec71b8b
parent1586b96477de9c56e55664abbd27e88a7c430b77 (diff)
avoid null-pointer deref (aka CAN-2004-0079)
see http://www.openssl.org/news/secadv_20040317.txt
-rw-r--r--lib/libssl/s3_pkt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libssl/s3_pkt.c b/lib/libssl/s3_pkt.c
index 3f88429e79a..9f3e5139ad9 100644
--- a/lib/libssl/s3_pkt.c
+++ b/lib/libssl/s3_pkt.c
@@ -1085,6 +1085,14 @@ start:
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)