For avoiding buffer overflow in FTP welcome message, what is the maximum size for it?
I know it could contain multiple lines, for example:
220-QTCP at fran.csg.stercomm.com.
220 Connection will close if idle more than 5 minutes.
but is there a specifications for how many rows or char is it suppose to contain?
Thanks,
There are generally no limits specified in FTP specifications.
Quoting RFC 624 section 5:
- There is no specified maximum length of a TELNET command line, TELNET reply line, user name, password, account, or pathname.
It refers to "TELNET lines" because FTP control connection uses the TELNET protocol format. Quoting RFC 959 section 2.2:
control connection
The communication path between the USER-PI and SERVER-PI for the exchange of commands and replies. This connection follows the Telnet Protocol.