summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2008-12-29 11:54:56 +0000
committerBen Laurie <ben@openssl.org>2008-12-29 11:54:56 +0000
commit85e878f224f16d21c09b1916c72ba0458335df7b (patch)
tree17500bdc3c05cecc9a739d88e62645e22137ccd3 /ssl/s3_enc.c
parentfe1c7fecf172f57834df2fca9ba32fec12dccf9f (diff)
Die earlier if hash is NULL. (Coverity IDs 137 & 138).
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r--ssl/s3_enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 701ac57179..96e59f678f 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -231,6 +231,8 @@ int ssl3_change_cipher_state(SSL *s, int which)
is_exp=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
c=s->s3->tmp.new_sym_enc;
m=s->s3->tmp.new_hash;
+ /* m == NULL will lead to a crash later */
+ OPENSSL_assert(m);
#ifndef OPENSSL_NO_COMP
if (s->s3->tmp.new_compression == NULL)
comp=NULL;