Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1284)

Unified Diff: xfa/src/fwl/src/lightwidget/listbox.cpp

Issue 1719803002: Resolve heap-use-after-free in CFX_WideString::~CFX_WideString() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/include/fwl/lightwidget/listbox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/lightwidget/listbox.cpp
diff --git a/xfa/src/fwl/src/lightwidget/listbox.cpp b/xfa/src/fwl/src/lightwidget/listbox.cpp
index 62e25cc36d19fbab99aa60b7be444a2f08b5f6ad..eb212fadcab6415bb179362a49b02b78030804f8 100644
--- a/xfa/src/fwl/src/lightwidget/listbox.cpp
+++ b/xfa/src/fwl/src/lightwidget/listbox.cpp
@@ -63,18 +63,10 @@ FX_BOOL CFWL_ListBox::DeleteString(FWL_HLISTITEM hItem) {
pSel->m_dwStates |= FWL_ITEMSTATE_LTB_Selected;
}
m_ListBoxDP.m_ItemArray.erase(m_ListBoxDP.m_ItemArray.begin() + nIndex);
- delete pDelItem;
return TRUE;
}
-FX_BOOL CFWL_ListBox::DeleteAll() {
- size_t iCount = m_ListBoxDP.CountItems(m_pIface);
- for (size_t i = 0; i < iCount; ++i) {
- CFWL_ListItem* pItem =
- reinterpret_cast<CFWL_ListItem*>(m_ListBoxDP.GetItem(m_pIface, i));
- delete pItem;
- }
+void CFWL_ListBox::DeleteAll() {
m_ListBoxDP.m_ItemArray.clear();
- return TRUE;
}
int32_t CFWL_ListBox::CountSelItems() {
if (!m_pIface)
« no previous file with comments | « xfa/include/fwl/lightwidget/listbox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698