wininet: Check for NULL lpwhh (Coverity).

This commit is contained in:
Marcus Meissner 2010-05-26 09:53:55 +02:00 committed by Alexandre Julliard
parent 7bc121c880
commit b7f3aa61f4
1 changed files with 5 additions and 0 deletions

View File

@ -2581,6 +2581,11 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
}
case INTERNET_OPTION_CONTEXT_VALUE:
{
if (!lpwhh)
{
SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
return FALSE;
}
if (!lpBuffer || dwBufferLength != sizeof(DWORD_PTR))
{
SetLastError(ERROR_INVALID_PARAMETER);