summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-05-26 21:12:04 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-05-26 21:12:04 +0200
commitbc5bb6a220d976d2fb0440adafd60fe558d6d130 (patch)
tree4b3b1de2c8cfd834fdeefb49ced525a971cf5fc3
parentdb70995366e465b002cbb7611e19c1f8f012203a (diff)
compat/tr: fix use-after-free #726
Found-by: Artem Sobolev
-rw-r--r--compat/tr.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/compat/tr.cpp b/compat/tr.cpp
index 7cff52a9..72e02527 100644
--- a/compat/tr.cpp
+++ b/compat/tr.cpp
@@ -5,13 +5,9 @@ TR::TR() : QObject(nullptr) {}
TR::TR(const TR&) : QObject(nullptr) {}
-TR& TR::operator=(const TR& other)
+TR& TR::operator=(const TR&)
{
- if (this == &other)
- return *this;
-
- this->~TR();
- return *new (this) TR;
+ return *this;
}
TR::~TR() {}