Hans Leidekker : wininet: More lenient parsing of the passive mode server response.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jun 7 16:26:38 CDT 2007


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

Author: Hans Leidekker <hans at it.vu.nl>
Date:   Thu Jun  7 16:32:24 2007 +0200

wininet: More lenient parsing of the passive mode server response.

---

 dlls/wininet/ftp.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c
index 604f383..d9291c2 100644
--- a/dlls/wininet/ftp.c
+++ b/dlls/wininet/ftp.c
@@ -2545,18 +2545,11 @@ static BOOL FTP_DoPassive(LPWININETFTPSESSIONW lpwfs)
 	    struct sockaddr_in dataSocketAddress;
 
 	    p = lpszResponseBuffer+4; /* skip status code */
+	    while (*p != '\0' && (*p < '0' || *p > '9')) p++;
 
-	    /* do a very strict check; we can improve that later. */
-
-	    if (strncmp(p, "Entering Passive Mode", 21))
-	    {
-		ERR("unknown response '%.*s', aborting\n", 21, p);
-		goto lend;
-	    }
-	    p += 21; /* skip string */
-	    if ((*p++ != ' ') || (*p++ != '('))
+	    if (*p == '\0')
 	    {
-		ERR("unknown response format, aborting\n");
+		ERR("no address found in response, aborting\n");
 		goto lend;
 	    }
 




More information about the wine-cvs mailing list