[openssl] master update

Dr. Paul Dale pauli at openssl.org
Mon Feb 17 09:29:57 UTC 2020


The branch master has been updated
       via  86cde3187d9acf6f331daff79ff2de87e86c6dc7 (commit)
       via  4f94f748980fc8e6283e0eae90f94950ffd4c1f8 (commit)
       via  5472821ece34c87148271abd649538da0743df40 (commit)
      from  31b28ad96aa841ae39d4009ebb15d90f2a2afdab (commit)


- Log -----------------------------------------------------------------
commit 86cde3187d9acf6f331daff79ff2de87e86c6dc7
Author: Pauli <paul.dale at oracle.com>
Date:   Sun Feb 16 18:02:38 2020 +1000

    ffc: use sizeof(*pointer) instead of sizeof(struct) in memset(3) call.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/11101)

commit 4f94f748980fc8e6283e0eae90f94950ffd4c1f8
Author: Pauli <paul.dale at oracle.com>
Date:   Sun Feb 16 18:02:03 2020 +1000

    Coverity 1458438: fix uninitialised memory access.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/11101)

commit 5472821ece34c87148271abd649538da0743df40
Author: Pauli <paul.dale at oracle.com>
Date:   Sun Feb 16 17:58:45 2020 +1000

    Coverity 1458439: fix resource leak
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/11101)

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

Summary of changes:
 crypto/ffc/ffc_params.c                         | 2 +-
 providers/implementations/asymciphers/rsa_enc.c | 1 +
 test/ffc_internal_test.c                        | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/crypto/ffc/ffc_params.c b/crypto/ffc/ffc_params.c
index 0c9d1a5d39..cb8987b64d 100644
--- a/crypto/ffc/ffc_params.c
+++ b/crypto/ffc/ffc_params.c
@@ -15,7 +15,7 @@
 
 void ffc_params_init(FFC_PARAMS *params)
 {
-    memset(params, 0, sizeof(FFC_PARAMS));
+    memset(params, 0, sizeof(*params));
     params->pcounter = -1;
     params->gindex = FFC_UNVERIFIABLE_GINDEX;
 }
diff --git a/providers/implementations/asymciphers/rsa_enc.c b/providers/implementations/asymciphers/rsa_enc.c
index 2cce8474cd..87349ed64b 100644
--- a/providers/implementations/asymciphers/rsa_enc.c
+++ b/providers/implementations/asymciphers/rsa_enc.c
@@ -119,6 +119,7 @@ static int rsa_encrypt(void *vprsactx, unsigned char *out, size_t *outlen,
             return 0;
         }
         if (prsactx->oaep_md == NULL) {
+            OPENSSL_free(tbuf);
             prsactx->oaep_md = EVP_MD_fetch(prsactx->libctx, "SHA-1", NULL);
             PROVerr(0, ERR_R_INTERNAL_ERROR);
             return 0;
diff --git a/test/ffc_internal_test.c b/test/ffc_internal_test.c
index 4aa23944af..e74dc1bd0f 100644
--- a/test/ffc_internal_test.c
+++ b/test/ffc_internal_test.c
@@ -393,9 +393,9 @@ static int ffc_params_fips186_2_gen_validate_test(void)
     FFC_PARAMS params;
     BIGNUM *bn = NULL;
 
+    ffc_params_init(&params);
     if (!TEST_ptr(bn = BN_new()))
         goto err;
-    ffc_params_init(&params);
     if (!TEST_true(ffc_params_FIPS186_2_generate(NULL, &params, FFC_PARAM_TYPE_DH,
                                                  1024, 160, NULL, &res, NULL)))
         goto err;


More information about the openssl-commits mailing list