add safe wxStrlcpy() function and replaced all wxStrncpy() calls by it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2485,8 +2485,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
if ( lvi.mask & LVIF_TEXT )
|
||||
{
|
||||
wxString text = OnGetItemText(item, lvi.iSubItem);
|
||||
wxStrncpy(lvi.pszText, text, lvi.cchTextMax - 1);
|
||||
lvi.pszText[lvi.cchTextMax - 1] = _T('\0');
|
||||
wxStrlcpy(lvi.pszText, text, lvi.cchTextMax);
|
||||
}
|
||||
|
||||
// see comment at the end of wxListCtrl::GetColumn()
|
||||
|
Reference in New Issue
Block a user