diff options
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);
}
|