From: Vadim Zeitlin Date: Sat, 6 Jul 2013 00:28:13 +0000 (+0000) Subject: Fix potential buffer overflow in wxSTC DefaultFont() function. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cb6223b4a6c945b00caafeadc87e1089793aafd7 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 --- diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index a11ddd82bc..b752c39689 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -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; }