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:
@@ -97,7 +97,7 @@ bool wxGetUserName(wxChar *buf, int maxSize)
|
||||
return false;
|
||||
}
|
||||
|
||||
wxStrncpy (buf, wxSafeConvertMB2WX(id), maxSize - 1);
|
||||
wxStrlcpy(buf, wxSafeConvertMB2WX(id), maxSize);
|
||||
|
||||
// free the buffer
|
||||
MemPtrUnlock(id);
|
||||
|
||||
Reference in New Issue
Block a user