wininet: Certain options of InternetQueryOption can take a NULL handle, so don't do the NULL handle check at the beginning.
This commit is contained in:
parent
9c9174efac
commit
d9bdf793fe
|
@ -1943,11 +1943,6 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
|
||||||
TRACE("(%p, 0x%08x, %p, %p)\n", hInternet, dwOption, lpBuffer, lpdwBufferLength);
|
TRACE("(%p, 0x%08x, %p, %p)\n", hInternet, dwOption, lpBuffer, lpdwBufferLength);
|
||||||
|
|
||||||
lpwhh = (LPWININETHANDLEHEADER) WININET_GetObject( hInternet );
|
lpwhh = (LPWININETHANDLEHEADER) WININET_GetObject( hInternet );
|
||||||
if (!lpwhh)
|
|
||||||
{
|
|
||||||
INTERNET_SetLastError(ERROR_INVALID_PARAMETER);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (dwOption)
|
switch (dwOption)
|
||||||
{
|
{
|
||||||
|
@ -2214,6 +2209,11 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT:
|
case INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT:
|
||||||
|
if (!lpwhh)
|
||||||
|
{
|
||||||
|
INTERNET_SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
if (*lpdwBufferLength < sizeof(INTERNET_CERTIFICATE_INFOW))
|
if (*lpdwBufferLength < sizeof(INTERNET_CERTIFICATE_INFOW))
|
||||||
{
|
{
|
||||||
*lpdwBufferLength = sizeof(INTERNET_CERTIFICATE_INFOW);
|
*lpdwBufferLength = sizeof(INTERNET_CERTIFICATE_INFOW);
|
||||||
|
|
|
@ -214,6 +214,11 @@ static void test_null(void)
|
||||||
ok( sz == lstrlenW(buffer), "sz wrong\n");
|
ok( sz == lstrlenW(buffer), "sz wrong\n");
|
||||||
ok( !lstrcmpW(szExpect, buffer), "cookie data wrong\n");
|
ok( !lstrcmpW(szExpect, buffer), "cookie data wrong\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sz = sizeof(buffer);
|
||||||
|
r = InternetQueryOptionA(NULL, INTERNET_OPTION_CONNECTED_STATE, buffer, &sz);
|
||||||
|
ok(r == TRUE, "ret %d\n", r);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(internet)
|
START_TEST(internet)
|
||||||
|
|
Loading…
Reference in New Issue