dmitry Thu Apr 3 10:25:08 2008 UTC
Modified files:
/php-src/sapi/cgi fastcgi.c
Log:
- Fixed possible stack buffer overflow in FastCGI SAPI. (Andrey Nigmatulin)
- Fixed sending of uninitialized paddings which may contain some information.
(Andrey Nigmatulin)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.44&r2=1.45&diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.44 php-src/sapi/cgi/fastcgi.c:1.45
--- php-src/sapi/cgi/fastcgi.c:1.44 Fri Feb 15 14:51:52 2008
+++ php-src/sapi/cgi/fastcgi.c Thu Apr 3 10:25:08 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fastcgi.c,v 1.44 2008/02/15 14:51:52 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.45 2008/04/03 10:25:08 dmitry Exp $ */
#include "php.h"
#include "fastcgi.h"
@@ -593,6 +593,9 @@
hdr->reserved = 0;
hdr->type = type;
hdr->version = FCGI_VERSION_1;
+ if (pad) {
+ memset(((unsigned char*)hdr) + sizeof(fcgi_header) + len, 0,
pad);
+ }
return pad;
}
@@ -777,7 +780,7 @@
{
int ret, n, rest;
fcgi_header hdr;
- unsigned char buf[8];
+ unsigned char buf[255];
n = 0;
rest = len;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php