diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-11 15:20:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-11 15:20:17 +0000 |
commit | 7e315d1103af9248583483da99e96ca339bf2d20 (patch) | |
tree | 6398336a2286278e6857e3205247ba0ed74a2e20 /src/modules/fonts/FontOptions.cpp | |
parent | c391c203e82d635e58561911ac7753c1d1261cc9 (diff) |
unsafe string operations replaced with safe wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@12768 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/fonts/FontOptions.cpp')
-rw-r--r-- | src/modules/fonts/FontOptions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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);
|