diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-08-11 16:41:51 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-08-24 11:19:28 +1000 |
commit | fa519461c96c8d5c4652cd0decc5dd62d7d13629 (patch) | |
tree | 74d11b8045b0cc7849ea7d3161de322f72bf45c6 /crypto | |
parent | 51bba73e9361d19a0827e4459c01a7b3f6712415 (diff) | |
download | openssl-new-fa519461c96c8d5c4652cd0decc5dd62d7d13629.tar.gz |
Fix coverity CID #1458644 - Negative return passed to function taking size_t in ecdh_cms_set_shared_info()
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12628)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ec/ec_ameth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c index 8840d57188..67705d6fe4 100644 --- a/crypto/ec/ec_ameth.c +++ b/crypto/ec/ec_ameth.c @@ -976,7 +976,7 @@ static int ecdh_cms_set_shared_info(EVP_PKEY_CTX *pctx, CMS_RecipientInfo *ri) plen = CMS_SharedInfo_encode(&der, kekalg, ukm, keylen); - if (!plen) + if (plen <= 0) goto err; if (EVP_PKEY_CTX_set0_ecdh_kdf_ukm(pctx, der, plen) <= 0) |