diff options
author | Matt Caswell <matt@openssl.org> | 2017-06-21 15:55:20 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-08-21 08:44:44 +0100 |
commit | 8f9ee7a33f4e8a52642335673f2cdc57ecdd38cc (patch) | |
tree | 8d3f60bea216ace7d355f8099c74a027c0f92f67 /crypto | |
parent | de61c03cc7ac52e45d50504e8cf1dda2f5230b28 (diff) |
Remove OPENSSL_assert() from crypto/hmac
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3740)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/hmac/hmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c index 3952dd50ad..156725ea4c 100644 --- a/crypto/hmac/hmac.c +++ b/crypto/hmac/hmac.c @@ -37,7 +37,8 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, if (key != NULL) { reset = 1; j = EVP_MD_block_size(md); - OPENSSL_assert(j <= (int)sizeof(ctx->key)); + if (!ossl_assert(j <= (int)sizeof(ctx->key))) + goto err; if (j < len) { if (!EVP_DigestInit_ex(ctx->md_ctx, md, impl)) goto err; |