diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-25 02:02:41 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-25 02:02:41 -0400 |
commit | 53eb0f11aac7ff18d24da8eedebfc9a055add822 (patch) | |
tree | 4ac3d60dbe236a308086179b648e5f43130b6d98 /queue.cpp | |
parent | ed7566fb8dd6a2d9e5f8e9f0aea84eb1f03ccb3b (diff) | |
download | cryptopp-git-53eb0f11aac7ff18d24da8eedebfc9a055add822.tar.gz |
Added check to guard against self-assignment
Diffstat (limited to 'queue.cpp')
-rw-r--r-- | queue.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -427,6 +427,8 @@ byte * ByteQueue::CreatePutSpace(size_t &size) ByteQueue & ByteQueue::operator=(const ByteQueue &rhs) { + if(this == &rhs) return *this; + Destroy(); CopyFrom(rhs); return *this; |