Date: 19 May 2000 11:43:03 +0200 From: Dag-Erling Smorgrav <des@flood.ping.uio.no> To: Hajimu UMEMOTO (=?iso-2022-jp?b?GyRCR19LXBsoQiAbJEJIJRsoQg==?=) <ume@mahoroba.org> Cc: arch@FreeBSD.ORG Subject: Re: fetch(1) Message-ID: <xzp7lcqho48.fsf@flood.ping.uio.no> In-Reply-To: Dag-Erling Smorgrav's message of "19 May 2000 11:28:57 %2B0200" References: <200005122016.e4CKGtF38185@peace.mahoroba.org> <xzpog68i71b.fsf@flood.ping.uio.no> <200005161852.e4GIqhF74521@peace.mahoroba.org> <200005162001.e4GK1bF75342@peace.mahoroba.org> <xzpbt22horq.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav <des@flood.ping.uio.no> writes: > There are some places in ftp.c (e.g. the passive ftp code) that assume > there is text after the status code; I'll see what I can do to fix them. I think this fixes the PASV case: Index: ftp.c =================================================================== RCS file: /home/ncvs/src/lib/libfetch/ftp.c,v retrieving revision 1.19 diff -u -r1.19 ftp.c --- ftp.c 2000/05/15 08:24:58 1.19 +++ ftp.c 2000/05/19 09:41:42 @@ -238,11 +239,13 @@ * is IMHO the one and only weak point in the FTP protocol. */ ln = last_reply; - for (p = ln + 3; !isdigit(*p); p++) + for (p = ln + 3; *p && !isdigit(*p); p++) /* nothing */ ; - for (p--, i = 0; i < 6; i++) { - p++; /* skip the comma */ + for (i = 0; *p, i < 6; i++, p++) addr[i] = strtol(p, &p, 10); + if (i < 6) { + e = 999; + goto ouch; } /* seek to required offset */ DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp7lcqho48.fsf>