summaryrefslogtreecommitdiffstats
path: root/providers/common
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-09-09 08:04:45 +1000
committerPauli <paul.dale@oracle.com>2019-09-11 08:27:27 +1000
commitd111712f6a7ae0ce37062d75fa3fa72e277e7455 (patch)
tree3b07cc7afe489d85ce9746d3b9b4e75121397aed /providers/common
parent64da55a64f141bb068f034ab0df34ec2a044e482 (diff)
Coverity 1453633: Error handling issues (CHECKED_RETURN)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
Diffstat (limited to 'providers/common')
-rw-r--r--providers/common/kdfs/pbkdf2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/providers/common/kdfs/pbkdf2.c b/providers/common/kdfs/pbkdf2.c
index ce395576dd..c8480125b2 100644
--- a/providers/common/kdfs/pbkdf2.c
+++ b/providers/common/kdfs/pbkdf2.c
@@ -107,7 +107,9 @@ static void kdf_pbkdf2_init(KDF_PBKDF2 *ctx)
params[0] = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST,
SN_sha1, 0);
- ossl_prov_digest_load_from_params(&ctx->digest, params, provctx);
+ if (!ossl_prov_digest_load_from_params(&ctx->digest, params, provctx))
+ /* This is an error, but there is no way to indicate such directly */
+ ossl_prov_digest_reset(&ctx->digest);
ctx->iter = PKCS5_DEFAULT_ITER;
ctx->lower_bound_checks = KDF_PBKDF2_DEFAULT_CHECKS;
}