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/icolib | |
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/icolib')
-rw-r--r-- | src/modules/icolib/skin2icons.cpp | 5 | ||||
-rw-r--r-- | src/modules/icolib/skin2opts.cpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp index da484434a5..101196705b 100644 --- a/src/modules/icolib/skin2icons.cpp +++ b/src/modules/icolib/skin2icons.cpp @@ -119,10 +119,9 @@ IconSourceFile* IconSourceFile_Get(const TCHAR* file, bool isPath) return NULL;
if (isPath)
- PathToAbsoluteT(file, fileFull);
- /// TODO: convert path to long - eliminate duplicate items
+ PathToAbsoluteT(file, fileFull); /// TODO: convert path to long - eliminate duplicate items
else
- _tcscpy(fileFull, file);
+ _tcsncpy_s(fileFull, file, _TRUNCATE);
IconSourceFile key = { fileFull };
int ix;
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp index 79942519b9..cb11ca0066 100644 --- a/src/modules/icolib/skin2opts.cpp +++ b/src/modules/icolib/skin2opts.cpp @@ -970,7 +970,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (lvi.lParam < iconList.getCount()) {
item = iconList[lvi.lParam];
if (item->temp_file)
- _tcsncpy(pInfoTip->pszText, item->temp_file, pInfoTip->cchTextMax);
+ _tcsncpy_s(pInfoTip->pszText, pInfoTip->cchTextMax, item->temp_file, _TRUNCATE);
else if (item->default_file)
mir_sntprintf(pInfoTip->pszText, pInfoTip->cchTextMax, _T("%s, %d"), item->default_file, item->default_indx);
}
|