[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Tue Oct 17 19:38:50 UTC 2017


The branch master has been updated
       via  432f8688bb72e21939845ac7a69359ca718c6676 (commit)
      from  f5791af386b90d5e629687e23ba0681dd4070395 (commit)


- Log -----------------------------------------------------------------
commit 432f8688bb72e21939845ac7a69359ca718c6676
Author: Andy Polyakov <appro at openssl.org>
Date:   Sat Oct 14 10:21:19 2017 +0200

    x509v3/v3_utl.c: avoid double-free.
    
    Thanks to David Benjamin for spotting this.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/4532)

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

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

diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c
index a839861..4dbcfaa 100644
--- a/crypto/x509v3/v3_utl.c
+++ b/crypto/x509v3/v3_utl.c
@@ -56,8 +56,10 @@ int X509V3_add_value(const char *name, const char *value,
     return 1;
  err:
     X509V3err(X509V3_F_X509V3_ADD_VALUE, ERR_R_MALLOC_FAILURE);
-    if (sk_allocated)
+    if (sk_allocated) {
         sk_CONF_VALUE_free(*extlist);
+        *extlist = NULL;
+    }
     OPENSSL_free(vtmp);
     OPENSSL_free(tname);
     OPENSSL_free(tvalue);


More information about the openssl-commits mailing list