Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr --- It feels '+ 1' is overkill in this very case, is it not? --- dlls/credui/credui_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c index bf9f7d1..dc190b7 100644 --- a/dlls/credui/credui_main.c +++ b/dlls/credui/credui_main.c @@ -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) + 1) * 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) + 1) * 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) + 1) * sizeof(WCHAR)); HeapFree(GetProcessHeap(), 0, entry->pszPassword); HeapFree(GetProcessHeap(), 0, entry);