diff options
| author | Matt Caswell <[email protected]> | 2017-06-21 16:55:20 +0200 |
|---|---|---|
| committer | Matt Caswell <[email protected]> | 2017-08-21 09:44:44 +0200 |
| commit | 8f9ee7a33f4e8a52642335673f2cdc57ecdd38cc (patch) | |
| tree | 8d3f60bea216ace7d355f8099c74a027c0f92f67 /crypto/hmac | |
| parent | Remove OPENSSL_assert() from crypto/ec (diff) | |
| download | openssl-8f9ee7a33f4e8a52642335673f2cdc57ecdd38cc.tar.gz openssl-8f9ee7a33f4e8a52642335673f2cdc57ecdd38cc.zip | |
Remove OPENSSL_assert() from crypto/hmac
Reviewed-by: Andy Polyakov <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/3740)
Diffstat (limited to 'crypto/hmac')
| -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 3952dd50ade..156725ea4cf 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; |
