From: Pauli Date: Sun, 8 Sep 2019 08:33:12 +0000 (+1000) Subject: Coverity 1453630: Null pointer dereferences (FORWARD_NULL) X-Git-Tag: openssl-3.0.0-alpha1~1406 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=085f1d11a01e62c5abfe6486ee9dce00a808d977;p=oweals%2Fopenssl.git Coverity 1453630: Null pointer dereferences (FORWARD_NULL) Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/9805) --- 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))