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

Rich Salz rsalz at openssl.org
Sun Aug 21 17:39:17 UTC 2016


The branch OpenSSL_1_0_2-stable has been updated
       via  bc894569c0a450fb7cb56ad83f91d3ef686d9141 (commit)
      from  71da19b050ba67c489b6c5f2543bf239c1947543 (commit)


- Log -----------------------------------------------------------------
commit bc894569c0a450fb7cb56ad83f91d3ef686d9141
Author: Rich Salz <rsalz at openssl.org>
Date:   Sun Aug 21 13:23:45 2016 -0400

    Fix pointer/alloc prob from previous commit
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

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

Summary of changes:
 apps/ca.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/apps/ca.c b/apps/ca.c
index 0ad7be3..8a3c1e5 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -2106,9 +2106,11 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
     tm = X509_get_notAfter(ret);
     row[DB_type] = OPENSSL_malloc(2);
     row[DB_exp_date] = OPENSSL_malloc(tm->length + 1);
+    row[DB_rev_date] = OPENSSL_malloc(1);
     row[DB_file] = OPENSSL_malloc(8);
     row[DB_name] = X509_NAME_oneline(X509_get_subject_name(ret), NULL, 0);
     if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) ||
+        (row[DB_rev_date] == NULL) ||
         (row[DB_file] == NULL) || (row[DB_name] == NULL)) {
         BIO_printf(bio_err, "Memory allocation failure\n");
         goto err;
@@ -2116,7 +2118,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
 
     memcpy(row[DB_exp_date], tm->data, tm->length);
     row[DB_exp_date][tm->length] = '\0';
-    row[DB_rev_date] = '\0';
+    row[DB_rev_date][0] = '\0';
     strcpy(row[DB_file], "unknown");
     row[DB_type][0] = 'V';
     row[DB_type][1] = '\0';


More information about the openssl-commits mailing list