com php-src: Fix filter_var leak of object without __toString(): ext/filter/filter.c
| From: | Nikita Popov | Date: | Fri, 17 Apr 2015 19:51:49 +0000 |
| Subject: | com php-src: Fix filter_var leak of object without __toString(): ext/filter/filter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86361@lists.php.net to get a copy of this message | ||
Commit: ffa285ca7329d658737483d5beae5cce56d107dc
Author: Nikita Popov <nikic@php.net> Fri, 17 Apr 2015 11:16:31 +0200
Parents: 38da85f31304a5682858d43c16f19cf4db149591
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ffa285ca7329d658737483d5beae5cce56d107dc
Log:
Fix filter_var leak of object without __toString()
Changed paths:
M ext/filter/filter.c
Diff:
diff --git a/ext/filter/filter.c b/ext/filter/filter.c
index 67f190e..a2e22e7 100644
--- a/ext/filter/filter.c
+++ b/ext/filter/filter.c
@@ -388,6 +388,7 @@ static void php_zval_filter(zval *value, zend_long filter, zend_long flags, zval
ce = Z_OBJCE_P(value);
if (!ce->__tostring) {
+ zval_ptr_dtor(value);
ZVAL_FALSE(value);
return;
}