Hans Leidekker : wininet: Use a different pointer for the password in WININET_SetAuthorization.

Alexandre Julliard julliard at winehq.org
Fri Jul 24 08:49:20 CDT 2009


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Jul 23 20:56:42 2009 +0200

wininet: Use a different pointer for the password in WININET_SetAuthorization.

---

 dlls/wininet/dialogs.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c
index 7f150c7..d66e7e3 100644
--- a/dlls/wininet/dialogs.c
+++ b/dlls/wininet/dialogs.c
@@ -242,7 +242,7 @@ static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username,
     http_request_t *lpwhr;
     http_session_t *lpwhs;
     BOOL ret = FALSE;
-    LPWSTR p;
+    LPWSTR p, q;
 
     lpwhr = (http_request_t*) WININET_GetObject( hRequest );
     if( !lpwhr )
@@ -259,8 +259,8 @@ static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username,
     if( !p )
         goto done;
 
-    p = heap_strdupW(password);
-    if( !p )
+    q = heap_strdupW(password);
+    if( !q )
     {
         HeapFree(GetProcessHeap(), 0, username);
         goto done;
@@ -274,7 +274,7 @@ static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username,
         hIC->lpszProxyUsername = p;
 
         HeapFree(GetProcessHeap(), 0, hIC->lpszProxyPassword);
-        hIC->lpszProxyPassword = p;
+        hIC->lpszProxyPassword = q;
     }
     else
     {
@@ -282,7 +282,7 @@ static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username,
         lpwhs->lpszUserName = p;
 
         HeapFree(GetProcessHeap(), 0, lpwhs->lpszPassword);
-        lpwhs->lpszPassword = p;
+        lpwhs->lpszPassword = q;
     }
 
     ret = TRUE;




More information about the wine-cvs mailing list