mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 14:40:56 +00:00
wininet: Handle NULL req->netconn in INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT query.
This commit is contained in:
parent
dd35601b07
commit
33d62f3f17
@ -2125,6 +2125,9 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
|
||||
case INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT: {
|
||||
PCCERT_CONTEXT context;
|
||||
|
||||
if(!req->netconn)
|
||||
return ERROR_INTERNET_INVALID_OPERATION;
|
||||
|
||||
if(*size < sizeof(INTERNET_CERTIFICATE_INFOA)) {
|
||||
*size = sizeof(INTERNET_CERTIFICATE_INFOA);
|
||||
return ERROR_INSUFFICIENT_BUFFER;
|
||||
|
@ -3354,6 +3354,13 @@ static void test_options(int port)
|
||||
ret = InternetQueryOption(req, INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO, &idsi, &size);
|
||||
ok(ret, "InternetQueryOption failed %u\n", GetLastError());
|
||||
|
||||
size = 0;
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = InternetQueryOption(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, NULL, &size);
|
||||
error = GetLastError();
|
||||
ok(!ret, "InternetQueryOption succeeded\n");
|
||||
ok(error == ERROR_INTERNET_INVALID_OPERATION, "expected ERROR_INTERNET_INVALID_OPERATION, got %u\n", error);
|
||||
|
||||
/* INTERNET_OPTION_PROXY */
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = InternetQueryOptionA(ses, INTERNET_OPTION_PROXY, NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user