genprotimg: add missing return values

Fixes: 65b9fc442c ("genprotimg: introduce new tool for the creation of PV images")
Reviewed-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2021-06-23 13:13:47 +00:00
committed by Jan Höppner
parent d2611b472b
commit 71a667fbf0
3 changed files with 6 additions and 0 deletions

View File

@@ -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)__

View File

@@ -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++;

View File

@@ -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 */