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

Rich Salz rsalz at openssl.org
Thu Sep 7 20:18:33 UTC 2017


The branch OpenSSL_1_0_2-stable has been updated
       via  4d2df46cb38603c98fb49543738289c9176571d8 (commit)
      from  31c8b265591a0aaa462a1f3eb5770661aaac67db (commit)


- Log -----------------------------------------------------------------
commit 4d2df46cb38603c98fb49543738289c9176571d8
Author: Rich Salz <rsalz at openssl.org>
Date:   Thu Sep 7 16:17:06 2017 -0400

    Fix error handling/cleanup
    
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/4326)
    (cherry picked from commit 180794c54e98ae467c4ebced3737e1ede03e320a)

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

Summary of changes:
 crypto/asn1/x_name.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/crypto/asn1/x_name.c b/crypto/asn1/x_name.c
index 1fb7ad1..aea0c27 100644
--- a/crypto/asn1/x_name.c
+++ b/crypto/asn1/x_name.c
@@ -523,19 +523,11 @@ static int i2d_name_canon(STACK_OF(STACK_OF_X509_NAME_ENTRY) * _intname,
 
 int X509_NAME_set(X509_NAME **xn, X509_NAME *name)
 {
-    X509_NAME *in;
-
-    if (!xn || !name)
-        return (0);
-
-    if (*xn != name) {
-        in = X509_NAME_dup(name);
-        if (in != NULL) {
-            X509_NAME_free(*xn);
-            *xn = in;
-        }
-    }
-    return (*xn != NULL);
+    if ((name = X509_NAME_dup(name)) == NULL)
+        return 0;
+    X509_NAME_free(*xn);
+    *xn = name;
+    return 1;
 }
 
 IMPLEMENT_STACK_OF(X509_NAME_ENTRY)


More information about the openssl-commits mailing list