Fix errors found by parfait static analyser.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15579)
This commit is contained in:
Shane Lontis 2021-06-02 14:42:56 +10:00 committed by Pauli
parent 6436030486
commit ba3ea453b0
2 changed files with 3 additions and 1 deletions

View File

@ -125,7 +125,7 @@ void EVP_KDF_CTX_reset(EVP_KDF_CTX *ctx)
size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx)
{
OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
size_t s;
size_t s = 0;
if (ctx == NULL)
return 0;

View File

@ -87,6 +87,8 @@ static void *cmac_dup(void *vsrc)
return NULL;
dst = cmac_new(src->provctx);
if (dst == NULL)
return NULL;
if (!CMAC_CTX_copy(dst->ctx, src->ctx)
|| !ossl_prov_cipher_copy(&dst->cipher, &src->cipher)) {
cmac_free(dst);