(ftpfs_setup_passive_epsv): join tests.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2022-11-27 19:46:29 +03:00
parent e2521d2187
commit 9f6ef611f4
1 changed files with 2 additions and 5 deletions

View File

@ -1156,13 +1156,10 @@ ftpfs_setup_passive_epsv (struct vfs_class *me, struct vfs_s_super *super,
/* (|||<port>|) */
c = strchr (reply_str, '|');
if (c == NULL)
return FALSE;
if (strlen (c) > 3)
c += 3;
else
if (c == NULL || strlen (c) <= 3)
return FALSE;
c += 3;
port = atoi (c);
if (port < 0 || port > 65535)
return FALSE;