diff options
author | Matt Caswell <matt@openssl.org> | 2017-05-19 10:35:19 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-22 15:00:19 +0200 |
commit | 380a522f689252e7f19e0c44ea49461ec7bd040f (patch) | |
tree | 81a5820773c28b57d18610fea28e4b5dd074b18c /ssl/s3_enc.c | |
parent | Add a macro for testing assertion in both debug and production builds (diff) | |
download | openssl-380a522f689252e7f19e0c44ea49461ec7bd040f.tar.xz openssl-380a522f689252e7f19e0c44ea49461ec7bd040f.zip |
Replace instances of OPENSSL_assert() with soft asserts in libssl
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3496)
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r-- | ssl/s3_enc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |