From 6edebc078c527112e15c75f2666653e5f53dc171 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 8 Oct 2014 15:30:54 +0200 Subject: SwPostItMgr::RemoveItem(): AddressSanitizer: heap-use-after-free Calling std::list::remove() iterates over all elements... Change-Id: I46d00217911c1863f70d3ba72dc7099411714471 --- sw/source/uibase/docvw/PostItMgr.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 6b1d5c90f97a..5daecba4624c 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -243,7 +243,7 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast ) SwSidebarItem* p = (*i); if (GetActiveSidebarWin() == p->pPostIt) SetActiveSidebarWin(0); - mvPostItFlds.remove(*i); + mvPostItFlds.erase(i); delete p->pPostIt; delete p; break; -- cgit