summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-08-11 16:41:51 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-08-22 15:36:35 +1000
commita752fc4da5e1dfd5b3a730d95272c2e2b0c48f1a (patch)
tree8c3c0e84d7a529f529380dc3cba8311e33aace40
parent0b03a810b005f2d3a9962526a6ca56accbe55ce4 (diff)
Fix coverity CID #1458644 - Negative return passed to function taking size_t in ecdh_cms_set_shared_info()
-rw-r--r--crypto/ec/ec_ameth.c2
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)