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/plugins | |
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/plugins')
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 2 | ||||
-rw-r--r-- | src/modules/plugins/pluginopts.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 511ab1fdd4..ff12e0d907 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -392,7 +392,7 @@ void enumPlugins(SCAN_PLUGINS_CALLBACK cb, WPARAM wParam, LPARAM lParam) pluginEntry* OpenPlugin(TCHAR *tszFileName, TCHAR *dir, TCHAR *path)
{
pluginEntry *p = (pluginEntry*)HeapAlloc(hPluginListHeap, HEAP_NO_SERIALIZE | HEAP_ZERO_MEMORY, sizeof(pluginEntry));
- _tcsncpy(p->pluginname, tszFileName, SIZEOF(p->pluginname));
+ _tcsncpy_s(p->pluginname, tszFileName, _TRUNCATE);
// add it to the list anyway
pluginList.insert(p);
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index ab774cae9f..61d0205689 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -85,7 +85,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, TCHAR *path, WPARAM, LPARAM l }
CharLower(fd->cFileName);
- _tcsncpy(dat->fileName, fd->cFileName, SIZEOF(dat->fileName));
+ _tcsncpy_s(dat->fileName, fd->cFileName, _TRUNCATE);
HWND hwndList = (HWND)lParam;
|