From f2ab8671bf5433eee5862bfa723feb54e4d63e9f Mon Sep 17 00:00:00 2001 From: George Tasker Date: Sun, 28 Jan 2001 19:29:23 +0000 Subject: [PATCH 1/1] Fixed buffer overrun in call to wxStripMenuCodes() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/ownerdrw.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index f0f1223260..b23fb671e2 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -73,11 +73,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) wxMemoryDC dc; dc.SetFont(GetFont()); - // ## ugly... - wxChar *szStripped = new wxChar[m_strName.Len()]; - wxStripMenuCodes((wxChar *)m_strName.c_str(), szStripped); - wxString str = szStripped; - delete [] szStripped; + wxString str = wxStripMenuCodes(m_strName); // # without this menu items look too tightly packed (at least under Windows) str += wxT('W'); // 'W' is typically the widest letter -- 2.45.2