From 3515776ea5638d93b85c871667a77f9d1ed44f6c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 24 Nov 2009 00:02:21 +0000 Subject: [PATCH] Don't use unsafe strcpy() when parsing wxNativeFontInfo. Fix a nice buffer overflow waiting to happen due to the use of wxStrcpy(). Call wxNativeFontInfo::SetFaceName() which uses wxStrlcpy() instead. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/font.cpp b/src/msw/font.cpp index fde6b86faf..ac1a4d3cce 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -770,7 +770,7 @@ bool wxNativeFontInfo::FromString(const wxString& s) return false; // the face name may be empty - wxStrcpy(lf.lfFaceName, tokenizer.GetNextToken()); + SetFaceName(tokenizer.GetNextToken()); return true; } -- 2.50.0