[openssl] master update

tomas at openssl.org tomas at openssl.org
Wed Jan 12 12:03:42 UTC 2022


The branch master has been updated
       via  a4e01187d3648d9ce99507097400902cf21f9b55 (commit)
      from  a10a576090022e583a06271ceced8e38dd509657 (commit)


- Log -----------------------------------------------------------------
commit a4e01187d3648d9ce99507097400902cf21f9b55
Author: Tomas Mraz <tomas at openssl.org>
Date:   Mon Jan 10 17:09:59 2022 +0100

    EVP_DigestSignFinal: *siglen should not be read if sigret == NULL
    
    This fixes small regression from #16962.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17460)

-----------------------------------------------------------------------

Summary of changes:
 crypto/evp/m_sigver.c | 4 ++--
 1 file 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;
 


More information about the openssl-commits mailing list