Commit 78b81323 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

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

parent 481c9b89
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment