From 380a522f689252e7f19e0c44ea49461ec7bd040f Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 19 May 2017 09:35:19 +0100 Subject: Replace instances of OPENSSL_assert() with soft asserts in libssl Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/3496) --- ssl/s3_enc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ssl/s3_enc.c') diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 0d75567fc6..1cd28ee2b0 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -120,7 +120,10 @@ int ssl3_change_cipher_state(SSL *s, int which) c = s->s3->tmp.new_sym_enc; m = s->s3->tmp.new_hash; /* m == NULL will lead to a crash later */ - OPENSSL_assert(m); + if (!ossl_assert(m != NULL)) { + SSLerr(SSL_F_SSL3_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR); + goto err2; + } #ifndef OPENSSL_NO_COMP if (s->s3->tmp.new_compression == NULL) comp = NULL; -- cgit v1.2.3