cvs: php-src /ext/ftp ftp.c

From: Date: Mon, 26 Mar 2007 08:02:36 +0000
Subject: cvs: php-src /ext/ftp ftp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-43638@lists.php.net to get a copy of this message
tony2001 Mon Mar 26 08:02:36 2007 UTC Modified files: /php-src/ext/ftp ftp.c Log: MFB http://cvs.php.net/viewvc.cgi/php-src/ext/ftp/ftp.c?r1=1.122&r2=1.123&diff_format=u Index: php-src/ext/ftp/ftp.c diff -u php-src/ext/ftp/ftp.c:1.122 php-src/ext/ftp/ftp.c:1.123 --- php-src/ext/ftp/ftp.c:1.122 Sat Feb 24 16:25:53 2007 +++ php-src/ext/ftp/ftp.c Mon Mar 26 08:02:36 2007 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c,v 1.122 2007/02/24 16:25:53 helly Exp $ */ +/* $Id: ftp.c,v 1.123 2007/03/26 08:02:36 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1096,12 +1096,18 @@ 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" */

« previous php.cvs (#43638) next »