aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-30 15:24:35 -0400
committerJack Lloyd <[email protected]>2017-09-30 15:24:35 -0400
commitdd860ab0c897ee6f3af8a549910e7ae0e3c4772c (patch)
treeeb4b859bfb8a70adb2473780403ab216cc10d0c2 /src/lib/x509
parent584d04af150847984b44c29c75458199932af1bc (diff)
Guard against self-assignment
Found with Sonar
Diffstat (limited to 'src/lib/x509')
-rw-r--r--src/lib/x509/x509_ext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp
index d71af82b7..3141d3c44 100644
--- a/src/lib/x509/x509_ext.cpp
+++ b/src/lib/x509/x509_ext.cpp
@@ -57,6 +57,9 @@ Extensions::Extensions(const Extensions& extensions) : ASN1_Object()
*/
Extensions& Extensions::operator=(const Extensions& other)
{
+ if(this == &other)
+ return *this;
+
m_extensions.clear();
for(size_t i = 0; i != other.m_extensions.size(); ++i)