Rob Shearman : credui: Verify some of the parameters to CredUIPromptForCredentials, like native does.
Alexandre Julliard
julliard at winehq.org
Thu Oct 25 08:38:43 CDT 2007
Module: wine
Branch: master
Commit: 3b219c9638486bc041d708d1932d3f579818880c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3b219c9638486bc041d708d1932d3f579818880c
Author: Rob Shearman <rob at codeweavers.com>
Date: Wed Oct 24 16:16:27 2007 +0100
credui: Verify some of the parameters to CredUIPromptForCredentials, like native does.
---
dlls/credui/credui_main.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c
index c313107..8d958c4 100644
--- a/dlls/credui/credui_main.c
+++ b/dlls/credui/credui_main.c
@@ -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)
{
More information about the wine-cvs
mailing list