mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
wininet: More lenient parsing of the passive mode server response.
This commit is contained in:
parent
a2daceb7c2
commit
9a6ba225e2
1 changed files with 3 additions and 10 deletions
|
@ -2545,18 +2545,11 @@ static BOOL FTP_DoPassive(LPWININETFTPSESSIONW lpwfs)
|
||||||
struct sockaddr_in dataSocketAddress;
|
struct sockaddr_in dataSocketAddress;
|
||||||
|
|
||||||
p = lpszResponseBuffer+4; /* skip status code */
|
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 (*p == '\0')
|
||||||
|
|
||||||
if (strncmp(p, "Entering Passive Mode", 21))
|
|
||||||
{
|
{
|
||||||
ERR("unknown response '%.*s', aborting\n", 21, p);
|
ERR("no address found in response, aborting\n");
|
||||||
goto lend;
|
|
||||||
}
|
|
||||||
p += 21; /* skip string */
|
|
||||||
if ((*p++ != ' ') || (*p++ != '('))
|
|
||||||
{
|
|
||||||
ERR("unknown response format, aborting\n");
|
|
||||||
goto lend;
|
goto lend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue