From: Andy Polyakov Date: Wed, 8 Jun 2016 18:38:12 +0000 (+0200) Subject: hmac/hmac.c: fix sizeof typo in hmac_ctx_cleanup. X-Git-Tag: OpenSSL_1_1_0-pre6~509 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85cbc182dab1409b98a14c5a891d1219617bd458;p=thirdparty%2Fopenssl.git hmac/hmac.c: fix sizeof typo in hmac_ctx_cleanup. Reviewed-by: Matt Caswell --- diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c index 848b5819472..da7f58688f1 100644 --- a/crypto/hmac/hmac.c +++ b/crypto/hmac/hmac.c @@ -141,7 +141,7 @@ static void hmac_ctx_cleanup(HMAC_CTX *ctx) EVP_MD_CTX_reset(ctx->md_ctx); ctx->md = NULL; ctx->key_length = 0; - memset(ctx->key, 0, sizeof(HMAC_MAX_MD_CBLOCK)); + OPENSSL_cleanse(ctx->key, sizeof(ctx->key)); } void HMAC_CTX_free(HMAC_CTX *ctx)