Check for an invalid hInternet handle in INET_QueryOptionHelper for

INTERNET_OPTION_PROXY before attempting to use it.
This commit is contained in:
Benjamin Cutler 2005-04-13 16:11:36 +00:00 committed by Alexandre Julliard
parent 4722941695
commit c2053e1ded
1 changed files with 7 additions and 0 deletions

View File

@ -1876,6 +1876,13 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
{
LPWININETAPPINFOW lpwai = (LPWININETAPPINFOW)lpwhh;
if (!lpwhh)
{
WARN("Invalid hInternet handle\n");
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (bIsUnicode)
{
INTERNET_PROXY_INFOW *pPI = (INTERNET_PROXY_INFOW *)lpBuffer;