pollita Sat Aug 4 07:53:00 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard user_filters.c
/php-src NEWS
Log:
MFH(r-1.49)Bugfix#36492 Userfilters can leak buckets
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.31.2.4.2.8&r2=1.31.2.4.2.9&diff_format=u
Index: php-src/ext/standard/user_filters.c
diff -u php-src/ext/standard/user_filters.c:1.31.2.4.2.8
php-src/ext/standard/user_filters.c:1.31.2.4.2.9
--- php-src/ext/standard/user_filters.c:1.31.2.4.2.8 Thu Feb 1 14:21:01 2007
+++ php-src/ext/standard/user_filters.c Sat Aug 4 07:53:00 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: user_filters.c,v 1.31.2.4.2.8 2007/02/01 14:21:01 tony2001 Exp $ */
+/* $Id: user_filters.c,v 1.31.2.4.2.9 2007/08/04 07:53:00 pollita Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -232,8 +232,21 @@
*bytes_consumed = Z_LVAL_P(zconsumed);
}
- if (retval)
+ if (retval) {
zval_ptr_dtor(&retval);
+ }
+
+ if (buckets_in->head) {
+ php_stream_bucket *bucket = buckets_in->head;
+
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unprocessed filter
buckets remaining on input brigade");
+ while ((bucket = buckets_in->head)) {
+ /* Remove unconsumed buckets from the brigade */
+ php_stream_bucket_unlink(bucket TSRMLS_CC);
+ php_stream_bucket_delref(bucket TSRMLS_CC);
+ }
+ }
+
zval_ptr_dtor(&zclosing);
zval_ptr_dtor(&zconsumed);
zval_ptr_dtor(&zout);
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.876&r2=1.2027.2.547.2.877&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.876 php-src/NEWS:1.2027.2.547.2.877
--- php-src/NEWS:1.2027.2.547.2.876 Thu Aug 2 22:28:18 2007
+++ php-src/NEWS Sat Aug 4 07:53:00 2007
@@ -1,6 +1,7 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Aug 2007, PHP 5.2.4
+- Fixed bug #36492 (Userfilters can leak buckets). (Sara)
02 Aug 2007, PHP 5.2.4RC1
- Removed --enable-versioning configure option. (Jani)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php