From 74bfb980377f43367035959a2c0afb5ec501c033 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 26 Jun 2018 15:21:09 +0100 Subject: Remove a memset Also avoids calling EVP_MD_size() and a missing negative result check. Issue found by Coverity. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6592) --- crypto/sm2/sm2_za.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'crypto/sm2') diff --git a/crypto/sm2/sm2_za.c b/crypto/sm2/sm2_za.c index 94d0dac02f..8f45082db4 100644 --- a/crypto/sm2/sm2_za.c +++ b/crypto/sm2/sm2_za.c @@ -59,8 +59,6 @@ int sm2_compute_userid_digest(uint8_t *out, goto done; } - memset(out, 0, EVP_MD_size(digest)); - if (!EVP_DigestInit(hash, digest)) { SM2err(SM2_F_SM2_COMPUTE_USERID_DIGEST, ERR_R_EVP_LIB); goto done; -- cgit v1.2.3