Commit 3b219c96 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

credui: Verify some of the parameters to CredUIPromptForCredentials, like native does.

parent 33d1ad10
......@@ -192,6 +192,15 @@ DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW pUIInfo,
debugstr_w(pszTargetName), Reserved, dwAuthError, debugstr_w(pszUsername),
ulUsernameMaxChars, pszPassword, ulPasswordMaxChars, pfSave, dwFlags);
if ((dwFlags & (CREDUI_FLAGS_ALWAYS_SHOW_UI|CREDUI_FLAGS_GENERIC_CREDENTIALS)) == CREDUI_FLAGS_ALWAYS_SHOW_UI)
return ERROR_INVALID_FLAGS;
if (!pszTargetName)
return ERROR_INVALID_PARAMETER;
if ((dwFlags & CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX) && !pfSave)
return ERROR_INVALID_PARAMETER;
params.pszTargetName = pszTargetName;
if (pUIInfo)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment