summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/job_packer.cpp
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2018-03-17 21:41:50 +0300
committerMataes <mataes2007@gmail.com>2018-03-17 21:41:50 +0300
commitf632783f27da5dd0ed3513bbee6182ea8af30afe (patch)
tree9cc74d2944501221126e628404532aed8c7b5cd9 /plugins/FTPFileYM/src/job_packer.cpp
parent32ac77ea600fa6ae33fea77d2be8fdaec865da7b (diff)
FTPFile: replace mir_strcpy and mir_wstrcpy
Diffstat (limited to 'plugins/FTPFileYM/src/job_packer.cpp')
-rw-r--r--plugins/FTPFileYM/src/job_packer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp
index 8428faf58c..79c4c9454e 100644
--- a/plugins/FTPFileYM/src/job_packer.cpp
+++ b/plugins/FTPFileYM/src/job_packer.cpp
@@ -39,27 +39,28 @@ void PackerJob::getZipFilePath()
wchar_t *pch;
if (m_files.size() == 1) {
- mir_wstrcpy(stzFileName, Utils::getFileNameFromPath(m_files[0]));
+ wcsncpy_s(stzFileName, Utils::getFileNameFromPath(m_files[0]), _TRUNCATE);
pch = wcsrchr(stzFileName, '.');
if (pch) *pch = 0;
}
else {
- mir_wstrcpy(buff, m_files[0]);
+ wcsncpy_s(buff, m_files[0], _TRUNCATE);
pch = wcsrchr(buff, '\\');
if (pch) {
*pch = 0;
pch = wcsrchr(buff, '\\');
- if (pch) mir_wstrcpy(stzFileName, pch + 1);
+ if (pch)
+ wcsncpy_s(stzFileName, pch + 1, _TRUNCATE);
}
}
if (stzFileName[0] == '\0')
- mir_wstrcpy(stzFileName, L"archive");
+ wcsncpy_s(stzFileName, L"archive", _TRUNCATE);
GetTempPath(_countof(buff), buff);
mir_snwprintf(m_tszFilePath, L"%s%s.zip", buff, stzFileName);
- mir_wstrcpy(m_tszFileName, Utils::getFileNameFromPath(m_tszFilePath));
+ wcsncpy_s(m_tszFileName, Utils::getFileNameFromPath(m_tszFilePath), _TRUNCATE);
if (opt.bSetZipName)
Utils::setFileNameDlg(m_tszFileName);