cryptui: Improve parameter checking.

This commit is contained in:
Juan Lang 2008-10-24 14:34:52 -07:00 committed by Alexandre Julliard
parent 7e0e1a1f9d
commit caa64b4d03
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,8 @@ BOOL WINAPI CryptUIWizImport(DWORD dwFlags, HWND hwndParent, LPCWSTR pwszWizardT
if (!(dwFlags & CRYPTUI_WIZ_NO_UI)) FIXME("UI not implemented\n");
if (!pImportSrc)
if (!pImportSrc ||
pImportSrc->dwSize != sizeof(CRYPTUI_WIZ_IMPORT_SRC_INFO))
{
SetLastError(E_INVALIDARG);
return FALSE;

View File

@ -197,7 +197,6 @@ static void test_crypt_ui_wiz_import(void)
memset(&info, 0, sizeof(info));
SetLastError(0xdeadbeef);
ret = pCryptUIWizImport(CRYPTUI_WIZ_NO_UI, 0, NULL, &info, NULL);
todo_wine
ok(!ret && GetLastError() == E_INVALIDARG,
"expected E_INVALIDARG, got %08x\n", GetLastError());
info.dwSize = sizeof(info);