credui: Use SecureZeroMemory().

Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Serge Gautherie 2018-10-03 00:21:54 +02:00 committed by Alexandre Julliard
parent 89f5a9df39
commit adf4512798
1 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
HeapFree(GetProcessHeap(), 0, entry->pszTargetName);
HeapFree(GetProcessHeap(), 0, entry->pszUsername);
ZeroMemory(entry->pszPassword, (strlenW(entry->pszPassword) + 1) * sizeof(WCHAR));
SecureZeroMemory(entry->pszPassword, strlenW(entry->pszPassword) * sizeof(WCHAR));
HeapFree(GetProcessHeap(), 0, entry->pszPassword);
HeapFree(GetProcessHeap(), 0, entry);
}
@ -673,7 +673,7 @@ DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW pUIInfo,
{
found = TRUE;
HeapFree(GetProcessHeap(), 0, entry->pszUsername);
ZeroMemory(entry->pszPassword, (strlenW(entry->pszPassword) + 1) * sizeof(WCHAR));
SecureZeroMemory(entry->pszPassword, strlenW(entry->pszPassword) * sizeof(WCHAR));
HeapFree(GetProcessHeap(), 0, entry->pszPassword);
}
@ -733,7 +733,7 @@ DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR pszTargetName, BOOL bConfirm)
HeapFree(GetProcessHeap(), 0, entry->pszTargetName);
HeapFree(GetProcessHeap(), 0, entry->pszUsername);
ZeroMemory(entry->pszPassword, (strlenW(entry->pszPassword) + 1) * sizeof(WCHAR));
SecureZeroMemory(entry->pszPassword, strlenW(entry->pszPassword) * sizeof(WCHAR));
HeapFree(GetProcessHeap(), 0, entry->pszPassword);
HeapFree(GetProcessHeap(), 0, entry);