tony2001 Thu Jan 25 12:22:21 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/bz2 bz2_filter.c
/php-src/ext/zlib zlib_filter.c
Log:
MFH: fix #40189 (possible endless loop in zlib.inflate stream filter)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.510&r2=1.2027.2.547.2.511&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.510 php-src/NEWS:1.2027.2.547.2.511
--- php-src/NEWS:1.2027.2.547.2.510 Tue Jan 23 18:14:52 2007
+++ php-src/NEWS Thu Jan 25 12:22:21 2007
@@ -7,6 +7,8 @@
thread safe version). (Dmitry)
- Fixed bug #40191 (use of array_unique() with objects triggers segfault).
(Tony)
+- Fixed bug #40189 (possible endless loop in zlib.inflate stream filter).
+ (Greg, Tony)
- Fixed bug #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2).
(Tony)
- Fixed bug #40092 (chroot() doesn't clear realpath cache). (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2_filter.c?r1=1.3.2.2.2.3&r2=1.3.2.2.2.4&diff_format=u
Index: php-src/ext/bz2/bz2_filter.c
diff -u php-src/ext/bz2/bz2_filter.c:1.3.2.2.2.3
php-src/ext/bz2/bz2_filter.c:1.3.2.2.2.4
--- php-src/ext/bz2/bz2_filter.c:1.3.2.2.2.3 Mon Jan 1 09:35:48 2007
+++ php-src/ext/bz2/bz2_filter.c Thu Jan 25 12:22:21 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: bz2_filter.c,v 1.3.2.2.2.3 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: bz2_filter.c,v 1.3.2.2.2.4 2007/01/25 12:22:21 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -101,6 +101,11 @@
consumed += desired;
bin += desired;
+ if (!desired) {
+ flags |= PSFS_FLAG_FLUSH_CLOSE;
+ break;
+ }
+
if (data->strm.avail_out < data->outbuf_len) {
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len -
data->strm.avail_out;
http://cvs.php.net/viewvc.cgi/php-src/ext/zlib/zlib_filter.c?r1=1.6.2.2.2.3&r2=1.6.2.2.2.4&diff_format=u
Index: php-src/ext/zlib/zlib_filter.c
diff -u php-src/ext/zlib/zlib_filter.c:1.6.2.2.2.3
php-src/ext/zlib/zlib_filter.c:1.6.2.2.2.4
--- php-src/ext/zlib/zlib_filter.c:1.6.2.2.2.3 Mon Jan 1 09:36:10 2007
+++ php-src/ext/zlib/zlib_filter.c Thu Jan 25 12:22:21 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zlib_filter.c,v 1.6.2.2.2.3 2007/01/01 09:36:10 sebastian Exp $ */
+/* $Id: zlib_filter.c,v 1.6.2.2.2.4 2007/01/25 12:22:21 tony2001 Exp $ */
#include "php.h"
#include "php_zlib.h"
@@ -100,6 +100,11 @@
consumed += desired;
bin += desired;
+ if (!desired) {
+ flags |= PSFS_FLAG_FLUSH_CLOSE;
+ break;
+ }
+
if (data->strm.avail_out < data->outbuf_len) {
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len -
data->strm.avail_out;
@@ -208,6 +213,11 @@
consumed += desired;
bin += desired;
+ if (!desired) {
+ flags |= PSFS_FLAG_FLUSH_CLOSE;
+ break;
+ }
+
if (data->strm.avail_out < data->outbuf_len) {
php_stream_bucket *out_bucket;
size_t bucketlen = data->outbuf_len -
data->strm.avail_out;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php