Commit caa64b4d authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

cryptui: Improve parameter checking.

parent 7e0e1a1f
......@@ -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;
......
......@@ -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);
......
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