diff options
author | Antony Dovgal <tony2001@php.net> | 2007-03-26 08:02:36 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2007-03-26 08:02:36 +0000 |
commit | 93a1275f8a8761d0138da64bec4bbaa932d8e06e (patch) | |
tree | fa9d4594a68575342e27f7d67380b0bbaf9b2a03 /ext/ftp | |
parent | 1126c3509fc0a7c90f39f11f75f63dfe01f50e1a (diff) | |
download | php-git-93a1275f8a8761d0138da64bec4bbaa932d8e06e.tar.gz |
MFB
Diffstat (limited to 'ext/ftp')
-rw-r--r-- | ext/ftp/ftp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index b2166f1bec..80165e8508 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1096,12 +1096,18 @@ ftp_putcmd(ftpbuf_t *ftp, const char *cmd, const char *args) int size; char *data; + if (strpbrk(cmd, "\r\n")) { + return 0; + } /* build the output buffer */ if (args && args[0]) { /* "cmd args\r\n\0" */ if (strlen(cmd) + strlen(args) + 4 > FTP_BUFSIZE) { return 0; } + if (strpbrk(args, "\r\n")) { + return 0; + } size = snprintf(ftp->outbuf, sizeof(ftp->outbuf), "%s %s\r\n", cmd, args); } else { /* "cmd\r\n\0" */ |