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

Matt Caswell matt at openssl.org
Tue Feb 14 10:31:58 UTC 2017


The branch OpenSSL_1_0_2-stable has been updated
       via  4fd35d83412946d19da05d4c89f6c2002d5c2e82 (commit)
      from  07109409daa674e4e766523a1dc51edb06299e03 (commit)


- Log -----------------------------------------------------------------
commit 4fd35d83412946d19da05d4c89f6c2002d5c2e82
Author: Yuchi <yt8mn at virginia.edu>
Date:   Sun Feb 5 19:33:47 2017 -0500

    mem leak on error path and error propagation fix
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2559)
    (cherry picked from commit e0670973d5c0b837eb5a9f1670e47107f466fbc7)

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

Summary of changes:
 crypto/ec/ec_ameth.c | 4 +++-
 ssl/ssl_ciph.c       | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c
index d089af7..2c41c6e 100644
--- a/crypto/ec/ec_ameth.c
+++ b/crypto/ec/ec_ameth.c
@@ -342,8 +342,10 @@ static int eckey_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
     }
 
     if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_X9_62_id_ecPublicKey), 0,
-                         ptype, pval, ep, eplen))
+                         ptype, pval, ep, eplen)) {
+        OPENSSL_free(ep);
         return 0;
+    }
 
     return 1;
 }
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 2ad8f43..92b022b 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -2001,7 +2001,7 @@ int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm)
     if (id < 193 || id > 255) {
         SSLerr(SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD,
                SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE);
-        return 0;
+        return 1;
     }
 
     MemCheck_off();


More information about the openssl-commits mailing list