summaryrefslogtreecommitdiff
path: root/src/modules/options
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-11 15:20:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-11 15:20:17 +0000
commit7e315d1103af9248583483da99e96ca339bf2d20 (patch)
tree6398336a2286278e6857e3205247ba0ed74a2e20 /src/modules/options
parentc391c203e82d635e58561911ac7753c1d1261cc9 (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/options')
-rw-r--r--src/modules/options/options.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp
index bfdcb82147..f9ae5965f7 100644
--- a/src/modules/options/options.cpp
+++ b/src/modules/options/options.cpp
@@ -209,7 +209,7 @@ static TCHAR* GetPluginName(HINSTANCE hInstance, TCHAR *buffer, int size)
else
dllName++;
- _tcsncpy(buffer, dllName, size);
+ _tcsncpy_s(buffer, size, dllName, _TRUNCATE);
return buffer;
}
@@ -517,7 +517,7 @@ static void RebuildPageTree(HWND hdlg, OptionsDlgData *dat)
else
pos = szFileName;
- _tcsncpy(dat->szFilterString, pos, SIZEOF(dat->szFilterString));
+ _tcsncpy_s(dat->szFilterString, pos, _TRUNCATE);
}
else {
int sel = SendDlgItemMessage(hdlg, IDC_KEYWORD_FILTER, (UINT)CB_GETCURSEL, 0, 0);
@@ -528,7 +528,7 @@ static void RebuildPageTree(HWND hdlg, OptionsDlgData *dat)
TCHAR *pos = _tcsrchr(szFileName, _T('\\'));
if (pos) pos++;
else pos = szFileName;
- _tcsncpy(dat->szFilterString, pos, SIZEOF(dat->szFilterString));
+ _tcsncpy_s(dat->szFilterString, pos, _TRUNCATE);
}
}