Fix potential buffer overflow in wxSTC DefaultFont() function.

Use safe(r) wxStrlcpy() instead of strcpy() to copy the font name.

Closes #15296.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-07-06 00:28:13 +00:00
parent 431b8364e6
commit cb6223b4a6

View File

@ -1410,7 +1410,7 @@ ColourDesired Platform::ChromeHighlight() {
const char *Platform::DefaultFont() {
static char buf[128];
strcpy(buf, wxNORMAL_FONT->GetFaceName().mbc_str());
wxStrlcpy(buf, wxNORMAL_FONT->GetFaceName().mbc_str(), WXSIZEOF(buf));
return buf;
}