summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-09-08 10:33:12 +0200
committerPauli <paul.dale@oracle.com>2019-09-11 00:27:26 +0200
commit085f1d11a01e62c5abfe6486ee9dce00a808d977 (patch)
tree8a2f70adabb26f74588acb57165599dc26d3ba9e /providers
parentCoverity 1453628: Null pointer dereferences (REVERSE_INULL) (diff)
downloadopenssl-085f1d11a01e62c5abfe6486ee9dce00a808d977.tar.xz
openssl-085f1d11a01e62c5abfe6486ee9dce00a808d977.zip
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')
-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))