Mike McCormack : wininet: Don't crash when querying NULL values.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 30 13:07:29 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 739cd1ea329d1a2bbc37df81052c448fbf22afe9
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=739cd1ea329d1a2bbc37df81052c448fbf22afe9

Author: Mike McCormack <mike at codeweavers.com>
Date:   Tue May 30 22:55:42 2006 +0900

wininet: Don't crash when querying NULL values.

---

 dlls/wininet/http.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index cb3c55c..428aa2a 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1363,6 +1363,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( 
             return TRUE;
         }
     case HTTP_QUERY_STATUS_TEXT:
+        if (lpwhr->lpszStatusText)
         {
             DWORD len = strlenW(lpwhr->lpszStatusText);
             if (len + 1 > *lpdwBufferLength/sizeof(WCHAR))
@@ -1378,7 +1379,9 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( 
 
             return TRUE;
         }
+        break;
     case HTTP_QUERY_VERSION:
+        if (lpwhr->lpszVersion)
         {
             DWORD len = strlenW(lpwhr->lpszVersion);
             if (len + 1 > *lpdwBufferLength/sizeof(WCHAR))
@@ -1394,6 +1397,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( 
 
             return TRUE;
         }
+        break;
     default:
         assert (LAST_TABLE_HEADER == (HTTP_QUERY_UNLESS_MODIFIED_SINCE + 1));
 




More information about the wine-cvs mailing list