[openssl] master update

Dr. Paul Dale pauli at openssl.org
Sun Jan 5 08:06:28 UTC 2020


The branch master has been updated
       via  75e571b59298c868763508d60027e4e666dee1c1 (commit)
       via  86723c2a103c763bc918dd70ffb3dd44ba5b5add (commit)
       via  4c1e06fc400041a47c36c4d66b8bbda30219052f (commit)
       via  ff19035e62a4839d632d0ac2c3b17983c9598cf9 (commit)
      from  1fdde9170cbe36c9cd7bf9dc712836f591f7d511 (commit)


- Log -----------------------------------------------------------------
commit 75e571b59298c868763508d60027e4e666dee1c1
Author: Pauli <paul.dale at oracle.com>
Date:   Fri Jan 3 19:28:37 2020 +1000

    coverity 1456638: fix null check
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10748)

commit 86723c2a103c763bc918dd70ffb3dd44ba5b5add
Author: Pauli <paul.dale at oracle.com>
Date:   Fri Jan 3 19:27:06 2020 +1000

    coverity 1456639: fix NULL dereference
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10748)

commit 4c1e06fc400041a47c36c4d66b8bbda30219052f
Author: Pauli <paul.dale at oracle.com>
Date:   Fri Jan 3 19:22:50 2020 +1000

    coverity 1456640: fix null check
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10748)

commit ff19035e62a4839d632d0ac2c3b17983c9598cf9
Author: Pauli <paul.dale at oracle.com>
Date:   Fri Jan 3 19:19:47 2020 +1000

    coverity 1456642: fix null check
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10748)

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

Summary of changes:
 providers/implementations/serializers/serializer_dh_priv.c  | 7 +++----
 providers/implementations/serializers/serializer_dsa_priv.c | 7 +++----
 providers/implementations/serializers/serializer_rsa_priv.c | 6 ++----
 test/x509_time_test.c                                       | 8 +++++---
 4 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/providers/implementations/serializers/serializer_dh_priv.c b/providers/implementations/serializers/serializer_dh_priv.c
index 80d87ac738..a6427dc867 100644
--- a/providers/implementations/serializers/serializer_dh_priv.c
+++ b/providers/implementations/serializers/serializer_dh_priv.c
@@ -48,11 +48,10 @@ static void *dh_priv_newctx(void *provctx)
 
     if (ctx != NULL) {
         ctx->provctx = provctx;
-    }
-
-    /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */
-    ctx->sc.pbe_nid = -1;
 
+        /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */
+        ctx->sc.pbe_nid = -1;
+    }
     return ctx;
 }
 
diff --git a/providers/implementations/serializers/serializer_dsa_priv.c b/providers/implementations/serializers/serializer_dsa_priv.c
index 603904369a..fc0a340ca2 100644
--- a/providers/implementations/serializers/serializer_dsa_priv.c
+++ b/providers/implementations/serializers/serializer_dsa_priv.c
@@ -48,11 +48,10 @@ static void *dsa_priv_newctx(void *provctx)
 
     if (ctx != NULL) {
         ctx->provctx = provctx;
-    }
-
-    /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */
-    ctx->sc.pbe_nid = -1;
 
+        /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */
+        ctx->sc.pbe_nid = -1;
+    }
     return ctx;
 }
 
diff --git a/providers/implementations/serializers/serializer_rsa_priv.c b/providers/implementations/serializers/serializer_rsa_priv.c
index 05d9316ba1..3d16e43a4b 100644
--- a/providers/implementations/serializers/serializer_rsa_priv.c
+++ b/providers/implementations/serializers/serializer_rsa_priv.c
@@ -77,11 +77,9 @@ static void *rsa_priv_newctx(void *provctx)
 
     if (ctx != NULL) {
         ctx->provctx = provctx;
+        /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */
+        ctx->sc.pbe_nid = -1;
     }
-
-    /* -1 is the "whatever" indicator, i.e. the PKCS8 library default PBE */
-    ctx->sc.pbe_nid = -1;
-
     return ctx;
 }
 
diff --git a/test/x509_time_test.c b/test/x509_time_test.c
index 8e813cb0f9..a9292dff0f 100644
--- a/test/x509_time_test.c
+++ b/test/x509_time_test.c
@@ -327,10 +327,11 @@ static int test_X509_cmp_timeframe(void)
     ASN1_TIME *asn1_before = ASN1_TIME_adj(NULL, now, -1, 0);
     ASN1_TIME *asn1_after = ASN1_TIME_adj(NULL, now, 1, 0);
     X509_VERIFY_PARAM *vpm = X509_VERIFY_PARAM_new();
-    int res;
+    int res = 0;
 
-    res = vpm != NULL
-        && test_X509_cmp_timeframe_vpm(NULL, asn1_before, asn1_mid, asn1_after)
+    if (vpm == NULL)
+        goto finish;
+    res = test_X509_cmp_timeframe_vpm(NULL, asn1_before, asn1_mid, asn1_after)
         && test_X509_cmp_timeframe_vpm(vpm, asn1_before, asn1_mid, asn1_after);
 
     X509_VERIFY_PARAM_set_time(vpm, now);
@@ -340,6 +341,7 @@ static int test_X509_cmp_timeframe(void)
         && test_X509_cmp_timeframe_vpm(vpm, asn1_before, asn1_mid, asn1_after);
 
     X509_VERIFY_PARAM_free(vpm);
+finish:
     ASN1_TIME_free(asn1_mid);
     ASN1_TIME_free(asn1_before);
     ASN1_TIME_free(asn1_after);


More information about the openssl-commits mailing list