diff --git a/crypto/evp/kdf_lib.c b/crypto/evp/kdf_lib.c index 77080e0b8d..5552b26601 100644 --- a/crypto/evp/kdf_lib.c +++ b/crypto/evp/kdf_lib.c @@ -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; diff --git a/providers/implementations/macs/cmac_prov.c b/providers/implementations/macs/cmac_prov.c index 4f8450475c..2291276035 100644 --- a/providers/implementations/macs/cmac_prov.c +++ b/providers/implementations/macs/cmac_prov.c @@ -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);