From cb6223b4a6c945b00caafeadc87e1089793aafd7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 6 Jul 2013 00:28:13 +0000 Subject: [PATCH] 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 --- src/stc/PlatWX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.0