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:
@@ -233,7 +233,7 @@ bool wxGetUserId(wxChar *buf, int n)
|
||||
if (!user)
|
||||
user = _T("user");
|
||||
|
||||
wxStrncpy(buf, user, n);
|
||||
wxStrlcpy(buf, user, n);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ bool wxGetHostName(wxChar *buf, int n)
|
||||
if (!host)
|
||||
host = _T("host");
|
||||
|
||||
wxStrncpy(buf, host, n);
|
||||
wxStrlcpy(buf, host, n);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user