diff options
author | Mataes <mataes2007@gmail.com> | 2018-03-31 20:01:27 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2018-03-31 20:01:27 +0300 |
commit | c3e735f9dcd73f1d9cbf502f2e04c1a4ecf9f0cd (patch) | |
tree | e9ab42a462ff74cabf7d4f31001ea53353191d45 /plugins | |
parent | 8d6d0d8db6a105676442a1e592c5973a2a14500e (diff) |
Msg_Export: mir_strcpy and mir_wstrcpy replaced to strncpy_s and wcsncpy_s
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/Msg_Export/src/FileViewer.cpp | 4 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/options.cpp | 2 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/utils.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index 434e1b025a..be585c029b 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -908,7 +908,7 @@ void SetRichEditFont(HWND hRichEdit, bool bUseSyntaxHL) ncf.dwMask = CFM_BOLD | CFM_FACE | CFM_ITALIC | CFM_SIZE | CFM_UNDERLINE;
ncf.dwEffects = db_get_dw(NULL, MODULE, szFileViewDB "TEffects", 0);
ncf.yHeight = db_get_dw(NULL, MODULE, szFileViewDB "THeight", 165);
- mir_wstrcpy(ncf.szFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", L"Courier New").c_str());
+ wcsncpy_s(ncf.szFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", L"Courier New").c_str(), _TRUNCATE);
if (!bUseSyntaxHL) {
ncf.dwMask |= CFM_COLOR;
@@ -1036,7 +1036,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, lf.lfStrikeOut = (dwEffects & CFE_STRIKEOUT) != 0;
lf.lfItalic = (dwEffects & CFE_ITALIC) != 0;
- mir_wstrcpy(lf.lfFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", L"Courier New").c_str());
+ wcsncpy_s(lf.lfFaceName, _DBGetString(NULL, MODULE, szFileViewDB "TFace", L"Courier New").c_str(), _TRUNCATE);
CHOOSEFONT cf = { 0 };
cf.lStructSize = sizeof(cf);
cf.hwndOwner = hwndDlg;
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 7765d1cc95..7dff1cf799 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -1043,7 +1043,7 @@ BOOL bApplyChanges2(HWND hwndDlg) enDeleteAction = eDANothing;
char szTemp[500];
- mir_strcpy(szTemp, "DisableProt_");
+ strncpy_s(szTemp, "DisableProt_", _TRUNCATE);
HWND hMapUser = GetDlgItem(hwndDlg, IDC_EXPORT_PROTOS);
int nCount = ListView_GetItemCount(hMapUser);
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 7dc168b153..b7baa46071 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -464,7 +464,7 @@ bool bWriteHexToFile(HANDLE hFile, void * pData, int nSize) bool bReadMirandaDirAndPath()
{
wchar_t szDBPath[MAX_PATH], tmp[MAX_PATH];
- mir_wstrcpy(szDBPath, pszDbPathError);
+ wcsncpy_s(szDBPath, pszDbPathError, _TRUNCATE);
PathToAbsoluteW(L"miranda32.exe", tmp);
sMirandaPath = tmp;
sMirandaPath.erase(sMirandaPath.find_last_of(L"\\"));
@@ -821,7 +821,7 @@ void DisplayErrorDialog(const wchar_t *pszError, tstring& sFilePath, DBEVENTINFO if (MessageBox(nullptr, sError.c_str(), MSG_BOX_TITEL, MB_YESNO) == IDYES) {
OPENFILENAME ofn; // common dialog box structure
wchar_t szFile[260]; // buffer for file name
- mir_wstrcpy(szFile, L"DebugInfo.txt");
+ wcsncpy_s(szFile, L"DebugInfo.txt", _TRUNCATE);
// Initialize OPENFILENAME
memset(&ofn, 0, sizeof(OPENFILENAME));
|