service->username = 0;\r
service->usernamelen = 0;\r
if (service->password) {\r
- SecureZeroMemory(service->password, service->passwordlen);\r
+ SecureZeroMemory(service->password, service->passwordlen * sizeof(TCHAR));\r
HeapFree(GetProcessHeap(), 0, service->password);\r
}\r
service->password = 0;\r
/* Get first password. */\r
if (! GetDlgItemText(tablist[NSSM_TAB_LOGON], IDC_PASSWORD1, service->password, (int) service->passwordlen)) {\r
HeapFree(GetProcessHeap(), 0, password);\r
- SecureZeroMemory(service->password, service->passwordlen);\r
+ SecureZeroMemory(service->password, service->passwordlen * sizeof(TCHAR));\r
HeapFree(GetProcessHeap(), 0, service->password);\r
service->password = 0;\r
service->passwordlen = 0;\r
\r
/* Get confirmation. */\r
if (! GetDlgItemText(tablist[NSSM_TAB_LOGON], IDC_PASSWORD2, password, (int) service->passwordlen)) {\r
- SecureZeroMemory(password, service->passwordlen);\r
+ SecureZeroMemory(password, service->passwordlen * sizeof(TCHAR));\r
HeapFree(GetProcessHeap(), 0, password);\r
- SecureZeroMemory(service->password, service->passwordlen);\r
+ SecureZeroMemory(service->password, service->passwordlen * sizeof(TCHAR));\r
HeapFree(GetProcessHeap(), 0, service->password);\r
service->password = 0;\r
service->passwordlen = 0;\r
/* Compare. */\r
if (_tcsncmp(password, service->password, service->passwordlen)) {\r
popup_message(window, MB_OK | MB_ICONEXCLAMATION, NSSM_GUI_MISSING_PASSWORD);\r
- SecureZeroMemory(password, service->passwordlen);\r
+ SecureZeroMemory(password, service->passwordlen * sizeof(TCHAR));\r
HeapFree(GetProcessHeap(), 0, password);\r
- SecureZeroMemory(service->password, service->passwordlen);\r
+ SecureZeroMemory(service->password, service->passwordlen * sizeof(TCHAR));\r
HeapFree(GetProcessHeap(), 0, service->password);\r
service->password = 0;\r
service->passwordlen = 0;\r
if (! service) return;\r
if (service->username) HeapFree(GetProcessHeap(), 0, service->username);\r
if (service->password) {\r
- SecureZeroMemory(service->password, service->passwordlen);\r
+ SecureZeroMemory(service->password, service->passwordlen * sizeof(TCHAR));\r
HeapFree(GetProcessHeap(), 0, service->password);\r
}\r
if (service->dependencies) HeapFree(GetProcessHeap(), 0, service->dependencies);\r