summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/x509/x_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/crypto/x509/x_name.c')
-rw-r--r--deps/openssl/openssl/crypto/x509/x_name.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/deps/openssl/openssl/crypto/x509/x_name.c b/deps/openssl/openssl/crypto/x509/x_name.c
index 0af5df5cfc..1a33dc1daa 100644
--- a/deps/openssl/openssl/crypto/x509/x_name.c
+++ b/deps/openssl/openssl/crypto/x509/x_name.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -472,6 +472,8 @@ static int i2d_name_canon(STACK_OF(STACK_OF_X509_NAME_ENTRY) * _intname,
int X509_NAME_set(X509_NAME **xn, X509_NAME *name)
{
+ if (*xn == name)
+ return *xn != NULL;
if ((name = X509_NAME_dup(name)) == NULL)
return 0;
X509_NAME_free(*xn);