summaryrefslogtreecommitdiff
path: root/plugins/ContextHelp/src/helppack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ContextHelp/src/helppack.cpp')
-rw-r--r--plugins/ContextHelp/src/helppack.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/ContextHelp/src/helppack.cpp b/plugins/ContextHelp/src/helppack.cpp
index 5b702c13e2..71f6e50de0 100644
--- a/plugins/ContextHelp/src/helppack.cpp
+++ b/plugins/ContextHelp/src/helppack.cpp
@@ -337,7 +337,7 @@ BOOL EnumPacks(ENUM_PACKS_CALLBACK callback, const TCHAR *pszFilePattern, const
/* get data */
ZeroMemory(&pack, sizeof(pack));
- lstrcpy(pack.szFileName, CharLower(wfd.cFileName)); /* buffer safe */
+ mir_tstrncpy(pack.szFileName, CharLower(wfd.cFileName), _countof(pack.szFileName)); /* buffer safe */
if (LoadPackData(&pack, FALSE, pszFileVersionHeader)) {
pack.ftFileDate = wfd.ftLastWriteTime;
fPackFound = TRUE;
@@ -423,7 +423,7 @@ void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL
BOOL fDirCreated = FALSE, fOneEnabled = FALSE;
/* main path */
- if (!GetModuleFileName(NULL, szDir, sizeof(szDir)))
+ if (!GetModuleFileName(NULL, szDir, _countof(szDir)))
return;
pszFile = _tcsrchr(szDir, _T('\\'));
if (pszFile != NULL)