Index: php5-5.2.4/sapi/cgi/fastcgi.c =================================================================== --- php5-5.2.4.orig/sapi/cgi/fastcgi.c 2007-07-09 07:48:39.000000000 -0400 +++ php5-5.2.4/sapi/cgi/fastcgi.c 2008-07-15 13:56:25.000000000 -0400 @@ -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; } @@ -768,7 +771,7 @@ { int ret, n, rest; fcgi_header hdr; - unsigned char buf[8]; + unsigned char buf[255]; n = 0; rest = len;