[openssl] master update
Dr. Paul Dale
pauli at openssl.org
Tue Jul 30 08:58:04 UTC 2019
The branch master has been updated
via d753cc333d941d0990ce74821c80b0bfb81e10dc (commit)
from 10f8b36874fca928c3f41834babac8ee94dd3f09 (commit)
- Log -----------------------------------------------------------------
commit d753cc333d941d0990ce74821c80b0bfb81e10dc
Author: Pauli <paul.dale at oracle.com>
Date: Sun Jul 28 18:21:07 2019 +1000
Fix coverity 1452084
Fix coverity 1452083
Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9470)
-----------------------------------------------------------------------
Summary of changes:
providers/common/exchange/dh_exch.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/providers/common/exchange/dh_exch.c b/providers/common/exchange/dh_exch.c
index 439b28a27e..b4bfd5f419 100644
--- a/providers/common/exchange/dh_exch.c
+++ b/providers/common/exchange/dh_exch.c
@@ -42,22 +42,22 @@ static int dh_init(void *vpdhctx, void *vdh)
{
PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx;
+ if (pdhctx == NULL || vdh == NULL || !DH_up_ref(vdh))
+ return 0;
DH_free(pdhctx->dh);
pdhctx->dh = vdh;
- DH_up_ref(pdhctx->dh);
-
- return pdhctx->dh != NULL;
+ return 1;
}
static int dh_set_peer(void *vpdhctx, void *vdh)
{
PROV_DH_CTX *pdhctx = (PROV_DH_CTX *)vpdhctx;
+ if (pdhctx == NULL || vdh == NULL || !DH_up_ref(vdh))
+ return 0;
DH_free(pdhctx->dhpeer);
pdhctx->dhpeer = vdh;
- DH_up_ref(pdhctx->dhpeer);
-
- return pdhctx->dhpeer != NULL;
+ return 1;
}
static int dh_derive(void *vpdhctx, unsigned char *key, size_t *keylen,
More information about the openssl-commits
mailing list