James Hawkins : wininet: Use a blank password if none is provided in FTP_Connect.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 6 06:08:56 CDT 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Mon Jul  3 14:09:03 2006 -0700

wininet: Use a blank password if none is provided in FTP_Connect.

---

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

diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 0970c95..7589a78 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -1674,6 +1674,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW 
 {
     static const WCHAR szDefaultUsername[] = {'a','n','o','n','y','m','o','u','s','\0'};
     static const WCHAR szDefaultPassword[] = {'u','s','e','r','@','s','e','r','v','e','r','\0'};
+    static const WCHAR szEmpty[] = {'\0'};
     struct sockaddr_in socketAddr;
     INT nsocket = -1;
     UINT sock_namelen;
@@ -1733,7 +1734,11 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW 
     }
     else {
         lpwfs->lpszUserName = WININET_strdupW(lpszUserName);
-        lpwfs->lpszPassword = WININET_strdupW(lpszPassword);
+
+        if (lpszPassword)
+            lpwfs->lpszPassword = WININET_strdupW(lpszPassword);
+        else
+            lpwfs->lpszPassword = WININET_strdupW(szEmpty);
     }
     
     /* Don't send a handle created callback if this handle was created with InternetOpenUrl */




More information about the wine-cvs mailing list