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:
@@ -436,8 +436,7 @@ bool wxGetEmailAddress(wxChar *address, int maxSize)
|
||||
if ( !email )
|
||||
return false;
|
||||
|
||||
wxStrncpy(address, email, maxSize - 1);
|
||||
address[maxSize - 1] = wxT('\0');
|
||||
wxStrlcpy(address, email, maxSize);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user