From 8e96015ebb47c86625f70efac6b702122968636e Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Mon, 3 Jul 2006 14:09:03 -0700 Subject: [PATCH] wininet: Use a blank password if none is provided in FTP_Connect. --- dlls/wininet/ftp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 0970c952269..7589a787d47 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -1674,6 +1674,7 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, { 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 hIC, LPCWSTR lpszServerName, } 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 */