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

Alexandre Julliard julliard at winehq.org
Fri Jul 10 08:52:05 CDT 2009


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Jul  9 11:45:48 2009 -0700

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

---

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

diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 6d41ac5..dce18bb 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -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)
     {




More information about the wine-cvs mailing list