diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 69a164c8b19..687dd19f0c0 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -394,6 +394,9 @@ ftp_syst(ftpbuf_t *ftp) return NULL; } syst = ftp->inbuf; + while (*syst == ' ') { + syst++; + } if ((end = strchr(syst, ' '))) { *end = 0; }