diff options
author | Jack Lloyd <[email protected]> | 2017-09-30 15:24:35 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-30 15:24:35 -0400 |
commit | dd860ab0c897ee6f3af8a549910e7ae0e3c4772c (patch) | |
tree | eb4b859bfb8a70adb2473780403ab216cc10d0c2 /src/lib/x509/x509_ext.cpp | |
parent | 584d04af150847984b44c29c75458199932af1bc (diff) |
Guard against self-assignment
Found with Sonar
Diffstat (limited to 'src/lib/x509/x509_ext.cpp')
-rw-r--r-- | src/lib/x509/x509_ext.cpp | 3 |
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) |