The branch OpenSSL_1_0_2-stable has been updated
       via  e6c53b0ced916633c8038736fde5613bf5b3e0dc (commit)
      from  04cf39207f94abf89b3964c7710f22f829a1a78f (commit)


- Log -----------------------------------------------------------------
commit e6c53b0ced916633c8038736fde5613bf5b3e0dc
Author: Bernd Edlinger <[email protected]>
Date:   Tue Mar 14 15:10:52 2017 +0100

    Fixed a crash in print_notice.
    
    Reviewed-by: Richard Levitte <[email protected]>
    Reviewed-by: Rich Salz <[email protected]>
    (Merged from https://github.com/openssl/openssl/pull/2935)
    (cherry picked from commit 29d1fad78899e5ae2997b19937a175784b21c996)

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

Summary of changes:
 crypto/x509v3/v3_cpols.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c
index f28acab..b99269e 100644
--- a/crypto/x509v3/v3_cpols.c
+++ b/crypto/x509v3/v3_cpols.c
@@ -458,9 +458,15 @@ static void print_notice(BIO *out, USERNOTICE *notice, int 
indent)
             num = sk_ASN1_INTEGER_value(ref->noticenos, i);
             if (i)
                 BIO_puts(out, ", ");
-            tmp = i2s_ASN1_INTEGER(NULL, num);
-            BIO_puts(out, tmp);
-            OPENSSL_free(tmp);
+            if (num == NULL)
+                BIO_puts(out, "(null)");
+            else {
+                tmp = i2s_ASN1_INTEGER(NULL, num);
+                if (tmp == NULL)
+                    return;
+                BIO_puts(out, tmp);
+                OPENSSL_free(tmp);
+            }
         }
         BIO_puts(out, "\n");
     }
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits

Reply via email to