https://git.reactos.org/?p=reactos.git;a=commitdiff;h=04683639f06a6e8d46694…
commit 04683639f06a6e8d4669448e2c583f3c885e8efa
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Fri Sep 28 17:51:12 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Fri Sep 28 17:51:12 2018 +0200
[SERVICES] RChangeServiceConfigW / RCreateServiceW: Use SecureZeroMemory to wipe
clear-text passwords after use.
---
base/system/services/rpcserver.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/base/system/services/rpcserver.c b/base/system/services/rpcserver.c
index f21df10e57..7f251c8760 100644
--- a/base/system/services/rpcserver.c
+++ b/base/system/services/rpcserver.c
@@ -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);
}