[PATCH] wininternet: check for NULL lpwhh (Coverity)

Nikolay Sivov bunglehead at gmail.com
Wed May 26 03:13:25 CDT 2010


On 5/26/2010 11:53, Marcus Meissner wrote:
> Hi,
>
> the other cases also check for NULL lpwhh, so do it too.
>
> Ciao, Marcus
> ---
>   dlls/wininet/internet.c |    5 +++++
>   1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
> index 5b1913a..fd93276 100644
> --- a/dlls/wininet/internet.c
> +++ b/dlls/wininet/internet.c
> @@ -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);
>    
Could you add a test for that?



More information about the wine-devel mailing list