mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
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:
parent
6436030486
commit
ba3ea453b0
@ -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)
|
size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx)
|
||||||
{
|
{
|
||||||
OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
|
OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
|
||||||
size_t s;
|
size_t s = 0;
|
||||||
|
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -87,6 +87,8 @@ static void *cmac_dup(void *vsrc)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dst = cmac_new(src->provctx);
|
dst = cmac_new(src->provctx);
|
||||||
|
if (dst == NULL)
|
||||||
|
return NULL;
|
||||||
if (!CMAC_CTX_copy(dst->ctx, src->ctx)
|
if (!CMAC_CTX_copy(dst->ctx, src->ctx)
|
||||||
|| !ossl_prov_cipher_copy(&dst->cipher, &src->cipher)) {
|
|| !ossl_prov_cipher_copy(&dst->cipher, &src->cipher)) {
|
||||||
cmac_free(dst);
|
cmac_free(dst);
|
||||||
|
Loading…
Reference in New Issue
Block a user