wininet: Fail in FTP if the resolved name is not an IPv4 address.

This commit is contained in:
Juan Lang 2009-07-09 11:45:48 -07:00 committed by Alexandre Julliard
parent 481c9b895d
commit 78b813236a
1 changed files with 6 additions and 0 deletions

View File

@ -2450,6 +2450,12 @@ HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
SendAsyncCallback(&hIC->hdr, dwContext, INTERNET_STATUS_NAME_RESOLVED,
(LPWSTR) lpszServerName, strlenW(lpszServerName));
if (socketAddr.sin_family != AF_INET)
{
WARN("unsupported address family %d\n", socketAddr.sin_family);
INTERNET_SetLastError(ERROR_INTERNET_CANNOT_CONNECT);
goto lerror;
}
nsocket = socket(AF_INET,SOCK_STREAM,0);
if (nsocket == -1)
{