Found by Linux Verification Center (linuxtesting.org) with SVACE.
CLA:trivial
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Fri Apr 3 15:24:39 2026
(Merged from https://github.com/openssl/openssl/pull/30589)
(cherry picked from commit
9ac50d2d7bdf207c2e408bed79641169f5c69894)
if (ossl_unlikely(pctx != NULL)
&& (pctx->operation == EVP_PKEY_OP_VERIFYCTX
|| pctx->operation == EVP_PKEY_OP_SIGNCTX)
- && pctx->op.sig.algctx != NULL
- && pctx->op.sig.signature->gettable_ctx_md_params != NULL)
+ && pctx->op.sig.signature != NULL
+ && pctx->op.sig.signature->gettable_ctx_md_params != NULL
+ && pctx->op.sig.algctx != NULL)
return pctx->op.sig.signature->gettable_ctx_md_params(
pctx->op.sig.algctx);