From: Matt Caswell Date: Wed, 21 Jun 2017 14:55:20 +0000 (+0100) Subject: Remove OPENSSL_assert() from crypto/hmac X-Git-Tag: OpenSSL_1_1_1-pre1~809 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f9ee7a33f4e8a52642335673f2cdc57ecdd38cc;p=oweals%2Fopenssl.git Remove OPENSSL_assert() from crypto/hmac Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/3740) --- 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;