From 739cd1ea329d1a2bbc37df81052c448fbf22afe9 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 30 May 2006 22:55:42 +0900 Subject: [PATCH] wininet: Don't crash when querying NULL values. --- dlls/wininet/http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index cb3c55c38c8..428aa2adf62 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1363,6 +1363,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev 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( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev 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( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev return TRUE; } + break; default: assert (LAST_TABLE_HEADER == (HTTP_QUERY_UNLESS_MODIFIED_SINCE + 1));