From 7e315d1103af9248583483da99e96ca339bf2d20 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 11 Apr 2015 15:20:17 +0000 Subject: unsafe string operations replaced with safe wherever possible git-svn-id: http://svn.miranda-ng.org/main/trunk@12768 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/fonts/FontOptions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/fonts/FontOptions.cpp') diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index e9bfe677d4..8b9b20f641 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -965,7 +965,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, F1.value.size = (char)lf.lfHeight; F1.value.style = (lf.lfWeight >= FW_BOLD ? DBFONTF_BOLD : 0) | (lf.lfItalic ? DBFONTF_ITALIC : 0) | (lf.lfUnderline ? DBFONTF_UNDERLINE : 0) | (lf.lfStrikeOut ? DBFONTF_STRIKEOUT : 0); F1.value.charset = lf.lfCharSet; - _tcscpy(F1.value.szFace, lf.lfFaceName); + _tcsncpy_s(F1.value.szFace, lf.lfFaceName, _TRUNCATE); MEASUREITEMSTRUCT mis = { 0 }; mis.CtlID = IDC_FONTLIST; @@ -1310,7 +1310,7 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar pf->value.size = (char)lf.lfHeight; pf->value.style = (lf.lfWeight >= FW_BOLD ? DBFONTF_BOLD : 0) | (lf.lfItalic ? DBFONTF_ITALIC : 0) | (lf.lfUnderline ? DBFONTF_UNDERLINE : 0) | (lf.lfStrikeOut ? DBFONTF_STRIKEOUT : 0); pf->value.charset = lf.lfCharSet; - _tcscpy(pf->value.szFace, lf.lfFaceName); + _tcsncpy_s(pf->value.szFace, lf.lfFaceName, _TRUNCATE); InvalidateRect( GetDlgItem(hwndDlg, IDC_PREVIEWHEADER), NULL, TRUE); InvalidateRect( GetDlgItem(hwndDlg, IDC_PREVIEWGENERAL), NULL, TRUE); -- cgit v1.2.3