dmitry          Fri Sep  7 08:42:33 2007 UTC

  Modified files:              
    /php-src/sapi/cgi   fastcgi.c 
  Log:
  forgotten part
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.41&r2=1.42&diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.41 php-src/sapi/cgi/fastcgi.c:1.42
--- php-src/sapi/cgi/fastcgi.c:1.41     Fri Sep  7 08:30:10 2007
+++ php-src/sapi/cgi/fastcgi.c  Fri Sep  7 08:42:33 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fastcgi.c,v 1.41 2007/09/07 08:30:10 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.42 2007/09/07 08:42:33 dmitry Exp $ */
 
 #include "php.h"
 #include "fastcgi.h"
@@ -717,6 +717,10 @@
                padding = hdr.paddingLength;
 
                while (hdr.type == FCGI_PARAMS && len > 0) {
+                       if (len + padding > FCGI_MAX_LENGTH) {
+                               return 0;
+                       }
+
                        if (safe_read(req, buf, len+padding) != len+padding) {
                                req->keep = 0;
                                return 0;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to