mirror of
https://github.com/reactos/reactos.git
synced 2026-06-06 21:51:53 +08:00
[SERVICES] RChangeServiceConfigW / RCreateServiceW: Use SecureZeroMemory to wipe clear-text passwords after use.
This commit is contained in:
@@ -2244,8 +2244,8 @@ done:
|
||||
if (lpClearTextPassword != NULL)
|
||||
{
|
||||
/* Wipe and release the password buffer */
|
||||
ZeroMemory(lpClearTextPassword,
|
||||
(wcslen(lpClearTextPassword) + 1) * sizeof(WCHAR));
|
||||
SecureZeroMemory(lpClearTextPassword,
|
||||
(wcslen(lpClearTextPassword) + 1) * sizeof(WCHAR));
|
||||
HeapFree(GetProcessHeap(), 0, lpClearTextPassword);
|
||||
}
|
||||
|
||||
@@ -2648,8 +2648,8 @@ done:
|
||||
if (lpClearTextPassword != NULL)
|
||||
{
|
||||
/* Wipe and release the password buffer */
|
||||
ZeroMemory(lpClearTextPassword,
|
||||
(wcslen(lpClearTextPassword) + 1) * sizeof(WCHAR));
|
||||
SecureZeroMemory(lpClearTextPassword,
|
||||
(wcslen(lpClearTextPassword) + 1) * sizeof(WCHAR));
|
||||
HeapFree(GetProcessHeap(), 0, lpClearTextPassword);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user