summaryrefslogtreecommitdiffstats
path: root/lib/libfetch
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-07-08 09:27:47 +0000
committerdes <des@FreeBSD.org>2000-07-08 09:27:47 +0000
commit866a6bff9ae3c97de03f630a7c21407ba9b47ad0 (patch)
treed41f3aa6d54ef3edb80d4a2b80f4138cd0087ac5 /lib/libfetch
parent216932df49a1c7ba7159b9109725dad703e789fe (diff)
downloadFreeBSD-src-866a6bff9ae3c97de03f630a7c21407ba9b47ad0.zip
FreeBSD-src-866a6bff9ae3c97de03f630a7c21407ba9b47ad0.tar.gz
Don't assume the remote address in a 227 reply is enclosed in parentheses.
Diffstat (limited to 'lib/libfetch')
-rw-r--r--lib/libfetch/ftp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index e6c520f..bb34aed 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -300,13 +300,12 @@ _ftp_transfer(int cd, char *oper, char *file,
* is IMHO the one and only weak point in the FTP protocol.
*/
ln = last_reply;
- for (p = ln + 3; *p && *p != '('; p++)
+ for (p = ln + 3; *p && !isdigit(*p); p++)
/* nothing */ ;
if (!*p) {
e = 999;
goto ouch;
}
- p++;
switch (e) {
case FTP_PASSIVE_MODE:
case FTP_LPASSIVE_MODE:
OpenPOWER on IntegriCloud