php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54350
Patch in_free-hack revision 2014-04-04 08:59 UTC by mike dot php dot net at gmail dot com

Patch in_free-hack for Reproducible crash Bug #54350

Patch version 2014-04-04 08:59 UTC

Return to Bug #54350 | Download this patch
Patch Revisions:

Developer: mike.php.net@gmail.com

diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index 6512718..69d8be8 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -218,12 +218,14 @@ php_stream_filter_status_t userfilter_filter(
 	ZVAL_BOOL(zclosing, flags & PSFS_FLAG_FLUSH_CLOSE);
 	args[3] = &zclosing;
 
+	stream->in_free++;
 	call_result = call_user_function_ex(NULL,
 			&obj,
 			&func_name,
 			&retval,
 			4, args,
 			0, NULL TSRMLS_CC);
+	stream->in_free--;
 
 	if (call_result == SUCCESS && retval != NULL) {
 		convert_to_long(retval);
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Sep 17 17:01:28 2019 UTC