diff --git a/CHANGELOG.md b/CHANGELOG.md index 385224fc..6e81c35e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Release history for s390-tools (MIT version) Bug Fixes: - dbginfo: add KVM data collection for server and guest - fix lszdev - dbginfo: add /proc/kallsyms - refresh zVM, lscpu - fix WORKARCHIVE handling + - genprotimg: Add missing return values in error paths * __v2.16.0 (2021-02-19)__ diff --git a/genprotimg/src/pv/pv_comp.c b/genprotimg/src/pv/pv_comp.c index 21879ae7..f37210c8 100644 --- a/genprotimg/src/pv/pv_comp.c +++ b/genprotimg/src/pv/pv_comp.c @@ -383,6 +383,7 @@ int64_t pv_component_update_tld(const PvComponent *comp, EVP_MD_CTX *ctx, g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_INTERNAL, _("BN_bin2bn failed")); + return -1; } for (uint64_t cur = 0; cur < size; cur += PAGE_SIZE) { @@ -395,6 +396,7 @@ int64_t pv_component_update_tld(const PvComponent *comp, EVP_MD_CTX *ctx, g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_INTERNAL, _("BN_bn2binpad failed")); + return -1; } if (EVP_DigestUpdate(ctx, tmp, sizeof(tmp)) != 1) { @@ -409,6 +411,7 @@ int64_t pv_component_update_tld(const PvComponent *comp, EVP_MD_CTX *ctx, g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_INTERNAL, _("BN_add_word failed")); + return -1; } nep++; diff --git a/genprotimg/src/utils/crypto.c b/genprotimg/src/utils/crypto.c index 05c3e832..81367b23 100644 --- a/genprotimg/src/utils/crypto.c +++ b/genprotimg/src/utils/crypto.c @@ -1847,6 +1847,7 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in, g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_INTERNAL, _("BN_add_word failed")); + return -1; } g_assert(BN_num_bytes(tweak_num) > 0); g_assert(BN_num_bytes(tweak_num) <= tweak_size); @@ -1855,6 +1856,7 @@ static gint __encrypt_decrypt_bio(const struct cipher_parms *parms, BIO *b_in, g_set_error(err, PV_CRYPTO_ERROR, PV_CRYPTO_ERROR_INTERNAL, _("BN_bn2binpad failed")); + return -1; }; /* set new tweak */