diff options
author | Tomas Mraz <tomas@openssl.org> | 2022-01-10 17:09:59 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-01-12 13:03:23 +0100 |
commit | a4e01187d3648d9ce99507097400902cf21f9b55 (patch) | |
tree | 81af37dfb19f34ec6d14eef7070e1bd2dfeeb175 /crypto/evp | |
parent | a10a576090022e583a06271ceced8e38dd509657 (diff) |
EVP_DigestSignFinal: *siglen should not be read if sigret == NULL
This fixes small regression from #16962.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17460)
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/m_sigver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c index e034189bb5..0993de0937 100644 --- a/crypto/evp/m_sigver.c +++ b/crypto/evp/m_sigver.c @@ -480,14 +480,14 @@ int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, if (sigret == NULL || (ctx->flags & EVP_MD_CTX_FLAG_FINALISE) != 0) return pctx->op.sig.signature->digest_sign_final(pctx->op.sig.algctx, sigret, siglen, - (siglen == NULL) ? 0 : *siglen); + sigret == NULL ? 0 : *siglen); dctx = EVP_PKEY_CTX_dup(pctx); if (dctx == NULL) return 0; r = dctx->op.sig.signature->digest_sign_final(dctx->op.sig.algctx, sigret, siglen, - (siglen == NULL) ? 0 : *siglen); + *siglen); EVP_PKEY_CTX_free(dctx); return r; |