Rob Shearman : wininet: HTTP_HttpQueryInfoW deals with bytes, not characters so update the callers that have this wrong assumption.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 15 07:43:03 CST 2007


Module: wine
Branch: master
Commit: 9efe083ec52ebe362ee54dfb35e8d7c8915c301e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9efe083ec52ebe362ee54dfb35e8d7c8915c301e

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Jan 12 19:19:18 2007 -0600

wininet: HTTP_HttpQueryInfoW deals with bytes, not characters so update the callers that have this wrong assumption.

---

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

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 9a2e739..c4c8fe4 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -665,7 +665,7 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hR
             (dwCode==302 || dwCode==301))
         {
             WCHAR szNewLocation[2048];
-            dwBufferSize=2048;
+            dwBufferSize=sizeof(szNewLocation);
             if(HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,NULL))
             {
 	            static const WCHAR szGET[] = { 'G','E','T', 0 };
@@ -2373,7 +2373,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWINI
             {
                 DWORD dwCode,dwCodeLength=sizeof(DWORD);
                 WCHAR szNewLocation[2048];
-                dwBufferSize=2048;
+                dwBufferSize=sizeof(szNewLocation);
                 if (HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE,&dwCode,&dwCodeLength,NULL) &&
                     (dwCode==HTTP_STATUS_REDIRECT || dwCode==HTTP_STATUS_MOVED) &&
                     HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_LOCATION,szNewLocation,&dwBufferSize,NULL))
@@ -2988,7 +2988,7 @@ static VOID HTTP_CloseConnection(LPWININ
 BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr)
 {
     WCHAR szConnectionResponse[20];
-    DWORD dwBufferSize = sizeof(szConnectionResponse)/sizeof(szConnectionResponse[0]);
+    DWORD dwBufferSize = sizeof(szConnectionResponse);
 
     TRACE("\n");
 




More information about the wine-cvs mailing list