diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 16:50:17 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-02 14:29:37 +0000 |
commit | 6929b4477b83c8e759ccc5dbc9483095e1c5a146 (patch) | |
tree | 3d12469b1b738c785c3ef2a8d92179916cf6aec4 | |
parent | 267b7789f83f7177c96a308a7b30ce4c234ceb52 (diff) |
Remove an OPENSSL_assert which could fail
An OPENSSL_assert was being used which could fail (e.g. on a malloc
failure).
Reviewed-by: Rich Salz <rsalz@openssl.org>
-rw-r--r-- | ssl/record/ssl3_record.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c index 86aaf4fcd8..359d247bbb 100644 --- a/ssl/record/ssl3_record.c +++ b/ssl/record/ssl3_record.c @@ -954,7 +954,8 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send) EVP_DigestSignUpdate(mac_ctx, header, sizeof(header)); EVP_DigestSignUpdate(mac_ctx, rec->input, rec->length); t = EVP_DigestSignFinal(mac_ctx, md, &md_size); - OPENSSL_assert(t > 0); + if (t <= 0) + return -1; if (!send && !SSL_USE_ETM(ssl) && FIPS_mode()) tls_fips_digest_extra(ssl->enc_read_ctx, mac_ctx, rec->input, |