[SERVICES] RChangeServiceConfigW / RCreateServiceW: Use SecureZeroMemory to wipe...
authorEric Kohl <eric.kohl@reactos.org>
Fri, 28 Sep 2018 15:51:12 +0000 (17:51 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 28 Sep 2018 15:51:12 +0000 (17:51 +0200)
base/system/services/rpcserver.c

index f21df10..7f251c8 100644 (file)
@@ -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);
     }