[openssl] master update

Dr. Paul Dale pauli at openssl.org
Sat Jun 26 01:33:07 UTC 2021


The branch master has been updated
       via  d4af922c583ce152f7d8f35869ab92d5b37cbfd2 (commit)
      from  a31350c07caeae4a2537a725bce15ecb1d262c53 (commit)


- Log -----------------------------------------------------------------
commit d4af922c583ce152f7d8f35869ab92d5b37cbfd2
Author: Pauli <pauli at openssl.org>
Date:   Fri Jun 25 09:28:26 2021 +1000

    apps: properly initialise arguments to EVP_PKEY_get_bn_param()
    
    This avoids use of uninitialised memory.
    
    Follow on to #15900
    
    Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15908)

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

Summary of changes:
 apps/req.c  | 2 +-
 apps/x509.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/req.c b/apps/req.c
index 9fbe4e250f..d0c620438b 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -994,7 +994,7 @@ int req_main(int argc, char **argv)
         }
         fprintf(stdout, "Modulus=");
         if (EVP_PKEY_is_a(tpubkey, "RSA")) {
-            BIGNUM *n;
+            BIGNUM *n = NULL;
 
             /* Every RSA key has an 'n' */
             EVP_PKEY_get_bn_param(pkey, "n", &n);
diff --git a/apps/x509.c b/apps/x509.c
index 558351ba30..b68530fb22 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -950,7 +950,7 @@ int x509_main(int argc, char **argv)
                 BN_print(out, n);
                 BN_free(n);
             } else if (EVP_PKEY_is_a(pkey, "DSA")) {
-                BIGNUM *dsapub;
+                BIGNUM *dsapub = NULL;
 
                 /* Every DSA key has a 'pub' */
                 EVP_PKEY_get_bn_param(pkey, "pub", &dsapub);


More information about the openssl-commits mailing list