Date: Fri, 19 May 2000 20:05:47 +0900 From: Hajimu UMEMOTO (=?iso-2022-jp?B?GyRCR19LXBsoQiAbJEJIJRsoQg==?=) <ume@bisd.hitachi.co.jp> To: des@flood.ping.uio.no Cc: arch@freebsd.org Subject: Re: fetch(1) Message-ID: <200005191105.e4JB5lx90246@plum.ssr.bisd.hitachi.co.jp> In-Reply-To: <xzpbt22horq.fsf@flood.ping.uio.no> References: <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
>>>>> On 19 May 2000 11:28:57 +0200 >>>>> des@flood.ping.uio.no (Dag-Erling Smorgrav) said: des> #define isftpreply(foo) (isdigit(foo[0]) && isdigit(foo[1]) \ des> - && isdigit(foo[2]) && foo[3] == ' ') des> + && isdigit(foo[2]) \ des> + && (foo[3] == ' ' || foo[3] == '\0')) Umm, I believe SPACE at foo[3] is not a optional text but required one. If actually foo[3] == '\0', it should be protocol error. RFC959 4.2. FTP REPLIES says: >Thus the format for multi-line replies is that the first line > will begin with the exact required reply code, followed > immediately by a Hyphen, "-" (also known as Minus), followed by > text. The last line will begin with the same code, followed > immediately by Space <SP>, optionally some text, and the Telnet > end-of-line code. > > For example: > 123-First line > Second line > 234 A line beginning with numbers > 123 The last line -- Hajimu UMEMOTO @ Business Solution System Development Div., Hitachi Ltd. E-Mail: ume@bisd.hitachi.co.jp ume@mahoroba.org ume@FreeBSD.org URL: http://www.imasy.org/~ume/ 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?200005191105.e4JB5lx90246>