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:
@@ -3850,8 +3850,7 @@ bool wxWindowMSW::HandleTooltipNotify(WXUINT code,
|
||||
// if we got TTN_NEEDTEXTW in Unicode build: in this case we just have
|
||||
// to copy the string we have into the buffer
|
||||
static wxChar buf[513];
|
||||
wxStrncpy(buf, ttip.c_str(), WXSIZEOF(buf) - 1);
|
||||
buf[WXSIZEOF(buf) - 1] = _T('\0');
|
||||
wxStrlcpy(buf, ttip.c_str(), WXSIZEOF(buf));
|
||||
ttText->lpszText = buf;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user