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
This commit is contained in:
parent
804250acc3
commit
3515776ea5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user