[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Richard Levitte levitte at openssl.org
Tue Jun 14 23:42:43 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  5e102f96eb6fcdba1db2dba41132f92fa492aea0 (commit)
       via  a9b23465243b6d692bb0b419bdbe0b1f5a849e9c (commit)
      from  95fb422aceea9f48e3f5f04c745801fcbf953012 (commit)


- Log -----------------------------------------------------------------
commit 5e102f96eb6fcdba1db2dba41132f92fa492aea0
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Jun 15 01:31:14 2016 +0200

    Change (!seqtt) to (seqtt == NULL)
    
    Reviewed-by: Stephen Henson <steve at openssl.org>
    Reviewed-by: Emilia Käsper <emilia at openssl.org>
    (cherry picked from commit fdcb499cc2cd57412e496302a4bca8c5d9f1a9c7)

commit a9b23465243b6d692bb0b419bdbe0b1f5a849e9c
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Jun 14 23:54:56 2016 +0200

    Always check that the value returned by asn1_do_adb() is non-NULL
    
    Reviewed-by: Stephen Henson <steve at openssl.org>
    Reviewed-by: Emilia Käsper <emilia at openssl.org>
    (cherry picked from commit bace847eae24f48adc6a967c6cce7f8d05bbeda3)

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

Summary of changes:
 crypto/asn1/tasn_dec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
index 6bdcd5c..6b01f65 100644
--- a/crypto/asn1/tasn_dec.c
+++ b/crypto/asn1/tasn_dec.c
@@ -401,6 +401,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
                 const ASN1_TEMPLATE *seqtt;
                 ASN1_VALUE **pseqval;
                 seqtt = asn1_do_adb(pval, tt, 1);
+                if (seqtt == NULL)
+                    continue;
                 pseqval = asn1_get_field_ptr(pval, seqtt);
                 ASN1_template_free(pseqval, seqtt);
             }
@@ -411,7 +413,7 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
             const ASN1_TEMPLATE *seqtt;
             ASN1_VALUE **pseqval;
             seqtt = asn1_do_adb(pval, tt, 1);
-            if (!seqtt)
+            if (seqtt == NULL)
                 goto err;
             pseqval = asn1_get_field_ptr(pval, seqtt);
             /* Have we ran out of data? */
@@ -476,7 +478,7 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
         for (; i < it->tcount; tt++, i++) {
             const ASN1_TEMPLATE *seqtt;
             seqtt = asn1_do_adb(pval, tt, 1);
-            if (!seqtt)
+            if (seqtt == NULL)
                 goto err;
             if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
                 ASN1_VALUE **pseqval;


More information about the openssl-commits mailing list