winhttp: Verify the async parameter type in IWinHttpRequest::Open.
This commit is contained in:
parent
912035f9c8
commit
0b366dca3c
|
@ -2992,7 +2992,7 @@ static HRESULT WINAPI winhttp_request_Open(
|
||||||
path[uc.dwUrlPathLength + uc.dwExtraInfoLength] = 0;
|
path[uc.dwUrlPathLength + uc.dwExtraInfoLength] = 0;
|
||||||
|
|
||||||
if (!(verb = strdupW( method ))) goto error;
|
if (!(verb = strdupW( method ))) goto error;
|
||||||
if (V_BOOL( &async )) flags |= WINHTTP_FLAG_ASYNC;
|
if (V_VT( &async ) == VT_BOOL && V_BOOL( &async )) flags |= WINHTTP_FLAG_ASYNC;
|
||||||
if (!(hsession = WinHttpOpen( user_agentW, WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, NULL, NULL, flags )))
|
if (!(hsession = WinHttpOpen( user_agentW, WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, NULL, NULL, flags )))
|
||||||
{
|
{
|
||||||
err = get_last_error();
|
err = get_last_error();
|
||||||
|
|
|
@ -2561,6 +2561,8 @@ static void test_IWinHttpRequest(void)
|
||||||
method = SysAllocString( method1W );
|
method = SysAllocString( method1W );
|
||||||
SysFreeString( url );
|
SysFreeString( url );
|
||||||
url = SysAllocString( url1W );
|
url = SysAllocString( url1W );
|
||||||
|
V_VT( &async ) = VT_ERROR;
|
||||||
|
V_ERROR( &async ) = DISP_E_PARAMNOTFOUND;
|
||||||
hr = IWinHttpRequest_Open( req, method, url, async );
|
hr = IWinHttpRequest_Open( req, method, url, async );
|
||||||
ok( hr == S_OK, "got %08x\n", hr );
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue