~ubuntu-branches/ubuntu/trusty/vsftpd/trusty-proposed

« back to all changes in this revision

Viewing changes to ftpcmdio.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-11-14 18:21:08 UTC
  • mto: (2.4.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20091114182108-x8n9136us3wdyyrd
Tags: upstream-2.2.2~pre1
ImportĀ upstreamĀ versionĀ 2.2.2~pre1

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
static void
211
211
control_getline(struct mystr* p_str, struct vsf_session* p_sess)
212
212
{
 
213
  int ret;
213
214
  if (p_sess->p_control_line_buf == 0)
214
215
  {
215
216
    vsf_secbuf_alloc(&p_sess->p_control_line_buf, VSFTP_MAX_COMMAND_LINE);
216
217
  }
217
 
  ftp_getline(p_sess, p_str, p_sess->p_control_line_buf);
 
218
  ret = ftp_getline(p_sess, p_str, p_sess->p_control_line_buf);
 
219
  if (ret < 0)
 
220
  {
 
221
    vsf_cmdio_write_exit(p_sess, FTP_BADCMD, "Input line too long.");
 
222
  }
218
223
  /* As mandated by the FTP specifications.. */
219
224
  str_replace_char(p_str, '\0', '\n');
220
225
  /* If the last character is a \r, strip it */