summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2013-10-04 22:52:27 (GMT)
committerTobias Markmann <tm@ayena.de>2013-10-04 23:03:52 (GMT)
commit1e68d4dffd81e69e2ff740fdf249a696f05e0544 (patch)
tree0e96091aa9ec8b2b28860a9dffb4b059f2391b27 /Swiften/MUC
parentec8adadffe97fe4c19567bb71f25b702e99770a1 (diff)
downloadswift-1e68d4dffd81e69e2ff740fdf249a696f05e0544.zip
swift-1e68d4dffd81e69e2ff740fdf249a696f05e0544.tar.bz2
Fix heap-use-after-free bugs reported by asan.
One only showed in netbook-mode. Another got introduced by the impromptu patch. Change-Id: Id878d001b6bac67f943a86386300c8a0db3bc74e License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swiften/MUC')
-rw-r--r--Swiften/MUC/MUC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/MUC/MUC.cpp b/Swiften/MUC/MUC.cpp
index ff26c86..f85cf8d 100644
--- a/Swiften/MUC/MUC.cpp
+++ b/Swiften/MUC/MUC.cpp
@@ -175,8 +175,8 @@ void MUC::handleIncomingPresence(Presence::ref presence) {
std::map<std::string,MUCOccupant>::iterator i = occupants.find(nick);
if (i != occupants.end()) {
//TODO: part type
- occupants.erase(i);
MUCOccupant occupant = i->second;
+ occupants.erase(i);
onOccupantLeft(occupant, type, "");
}
}