summaryrefslogtreecommitdiffstats
path: root/providers/common
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-09-08 18:33:12 +1000
committerPauli <paul.dale@oracle.com>2019-09-11 08:27:26 +1000
commit085f1d11a01e62c5abfe6486ee9dce00a808d977 (patch)
tree8a2f70adabb26f74588acb57165599dc26d3ba9e /providers/common
parent6ce4ff19158273ccf3313d5ece6adbd8bda0ac4b (diff)
Coverity 1453630: Null pointer dereferences (FORWARD_NULL)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/9805)
Diffstat (limited to 'providers/common')
-rw-r--r--providers/common/macs/gmac_prov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/providers/common/macs/gmac_prov.c b/providers/common/macs/gmac_prov.c
index 2da176d8b0..67f3e48407 100644
--- a/providers/common/macs/gmac_prov.c
+++ b/providers/common/macs/gmac_prov.c
@@ -174,7 +174,8 @@ static int gmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[])
OPENSSL_CTX *provctx = PROV_LIBRARY_CONTEXT_OF(macctx->provctx);
const OSSL_PARAM *p;
- if (!ossl_prov_cipher_load_from_params(&macctx->cipher, params, provctx))
+ if (ctx == NULL
+ || !ossl_prov_cipher_load_from_params(&macctx->cipher, params, provctx))
return 0;
if (EVP_CIPHER_mode(ossl_prov_cipher_cipher(&macctx->cipher))