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

Marcus Meissner marcus at jet.franken.de
Wed May 26 02:53:55 CDT 2010


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);
-- 
1.5.6



More information about the wine-patches mailing list