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

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Fri Nov 3 14:49:52 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  64adaa3fa6d1a2c961707308bee1230436076756 (commit)
      from  0627fa84a26cf7becbf2a489b97631b42c4946e6 (commit)


- Log -----------------------------------------------------------------
commit 64adaa3fa6d1a2c961707308bee1230436076756
Author: Pavel Kopyl <p.kopyl at samsung.com>
Date:   Fri Oct 27 16:18:06 2017 +0300

    Check return value of OBJ_nid2obj in dsa_pub_encode.
    
    CLA: trivial
    
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/4600)
    
    (cherry picked from commit 7760384b403a61824c43cc767a11cd22abfa9e49)

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

Summary of changes:
 crypto/dsa/dsa_ameth.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c
index fbb9121..d4e4066 100644
--- a/crypto/dsa/dsa_ameth.c
+++ b/crypto/dsa/dsa_ameth.c
@@ -82,6 +82,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
     int penclen;
     ASN1_STRING *str = NULL;
     ASN1_INTEGER *pubint = NULL;
+    ASN1_OBJECT *aobj;
 
     dsa = pkey->pkey.dsa;
     if (pkey->save_parameters && dsa->p && dsa->q && dsa->g) {
@@ -114,8 +115,11 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
         goto err;
     }
 
-    if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(EVP_PKEY_DSA),
-                               ptype, str, penc, penclen))
+    aobj = OBJ_nid2obj(EVP_PKEY_DSA);
+    if (aobj == NULL)
+        goto err;
+
+    if (X509_PUBKEY_set0_param(pk, aobj, ptype, str, penc, penclen))
         return 1;
 
  err:


More information about the openssl-commits mailing list