X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad8dd67e0248959b813797894c4b928f7cd73b84..26f7724c4b03d6d75f8aa80d6cd2b5099ac32ea1:/src/os2/fontutil.cpp?ds=sidebyside diff --git a/src/os2/fontutil.cpp b/src/os2/fontutil.cpp index e6d9b45d7f..8883b7305c 100644 --- a/src/os2/fontutil.cpp +++ b/src/os2/fontutil.cpp @@ -233,7 +233,7 @@ bool wxTestFontEncoding( const wxNativeEncodingInfo& rInfo ) vLogFont.fsFontUse = FATTR_FONTUSE_OUTLINE | // only outline fonts allowed FATTR_FONTUSE_TRANSFORMABLE; // may be transformed - wxStrncpy((wxChar*)vLogFont.szFacename, rInfo.facename.c_str(), WXSIZEOF(vLogFont.szFacename)); + wxStrlcpy((wxChar*)vLogFont.szFacename, rInfo.facename.c_str(), WXSIZEOF(vLogFont.szFacename)); if (!::GpiCreateLogFont( hPS ,NULL @@ -549,7 +549,7 @@ void wxOS2SelectMatchingFontByName( break; } - wxStrncpy(zFontFaceName, sFaceName.c_str(), WXSIZEOF(zFontFaceName)); + wxStrlcpy(zFontFaceName, sFaceName.c_str(), WXSIZEOF(zFontFaceName)); nPointSize = pFont->GetPointSize(); //