[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Rich Salz rsalz at openssl.org
Tue Feb 21 19:54:42 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  cc0a813f23136fb1f1aff8bf4cdc831ae3d360d4 (commit)
      from  ded9d1076cffc912ed7c40256b6202876a2b6caa (commit)


- Log -----------------------------------------------------------------
commit cc0a813f23136fb1f1aff8bf4cdc831ae3d360d4
Author: Dmitry Belyavskiy <beldmit at gmail.com>
Date:   Sat Feb 18 20:43:01 2017 +0300

    Fix memory leak in pkcs12 -export
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2676)
    (cherry picked from commit 1b8f19379a521ec11ce37e12316dd3edc0acfb82)

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

Summary of changes:
 crypto/pkcs12/p12_mutl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crypto/pkcs12/p12_mutl.c b/crypto/pkcs12/p12_mutl.c
index d6b8919..899a12e 100644
--- a/crypto/pkcs12/p12_mutl.c
+++ b/crypto/pkcs12/p12_mutl.c
@@ -204,6 +204,9 @@ int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
 {
     X509_ALGOR *macalg;
 
+    PKCS12_MAC_DATA_free(p12->mac);
+    p12->mac = NULL;
+
     if ((p12->mac = PKCS12_MAC_DATA_new()) == NULL)
         return PKCS12_ERROR;
     if (iter > 1) {


More information about the openssl-commits mailing list