Commit 9a6ba225 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent a2daceb7
......@@ -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;
}
......
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