summaryrefslogtreecommitdiff
path: root/plugins/ShellExt/src/shlcom.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/ShellExt/src/shlcom.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ShellExt/src/shlcom.cpp')
-rw-r--r--plugins/ShellExt/src/shlcom.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp
index c77d6f3d86..fe15398aee 100644
--- a/plugins/ShellExt/src/shlcom.cpp
+++ b/plugins/ShellExt/src/shlcom.cpp
@@ -90,7 +90,7 @@ BOOL AddToList(TAddArgList& args)
HANDLE hFind = FindFirstFileA(szBuf, &fd);
while (true) {
if (fd.cFileName[0] != '.') {
- mir_snprintf(szBuf, SIZEOF(szBuf),"%s\\%s", args.szFile, fd.cFileName);
+ mir_snprintf(szBuf, _countof(szBuf),"%s\\%s", args.szFile, fd.cFileName);
// keep a copy of the current thing being processed
szThis = args.szFile;
args.szFile = szBuf;
@@ -559,8 +559,8 @@ void CheckUnregisterServer()
if (bIsVistaPlus) {
// launches regsvr to remove the dll under admin.
TCHAR szFileName[MAX_PATH], szBuf[MAX_PATH * 2];
- GetModuleFileName(hInst, szFileName, SIZEOF(szFileName));
- mir_sntprintf(szBuf, SIZEOF(szBuf), _T("/s /u \"%s\""), szFileName);
+ GetModuleFileName(hInst, szFileName, _countof(szFileName));
+ mir_sntprintf(szBuf, _countof(szBuf), _T("/s /u \"%s\""), szFileName);
SHELLEXECUTEINFO sei = { sizeof(sei) };
sei.lpVerb = _T("runas");
@@ -588,8 +588,8 @@ void CheckRegisterServer()
TranslateT("Shell context menus requires your permission to register with Windows Explorer (one time only)."),
TranslateT("Miranda NG - Shell context menus (shellext.dll)"), MB_OK | MB_ICONINFORMATION);
// /s = silent
- GetModuleFileName(hInst, szFileName, SIZEOF(szFileName));
- mir_sntprintf(szBuf, SIZEOF(szBuf), _T("/s \"%s\""), szFileName);
+ GetModuleFileName(hInst, szFileName, _countof(szFileName));
+ mir_sntprintf(szBuf, _countof(szBuf), _T("/s \"%s\""), szFileName);
SHELLEXECUTEINFO sei = { sizeof(sei) };
sei.lpVerb = _T("runas");