From: Dr. Stephen Henson Date: Wed, 11 Apr 2012 15:05:33 +0000 (+0000) Subject: fix reset fix X-Git-Tag: OpenSSL_1_0_2-beta1~668 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=64e8dc79816d6751d56da4d9c186b334a87d6483;p=openssl fix reset fix --- diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index 7ae776e3fc..8004ae04bf 100644 --- a/crypto/cmac/cmac.c +++ b/crypto/cmac/cmac.c @@ -179,7 +179,7 @@ int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, return 0; if (!EVP_EncryptInit_ex(&ctx->cctx, NULL, NULL, NULL, zero_iv)) return 0; - memset(ctx->tbl, 0, bl); + memset(ctx->tbl, 0, M_EVP_CIPHER_CTX_block_size(&ctx->cctx)); ctx->nlast_block = 0; return 1; }