File tree Expand file tree Collapse file tree 3 files changed +27
-11
lines changed Expand file tree Collapse file tree 3 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 3
3
?? ??? 2015, PHP 5.5.23
4
4
5
5
- Core:
6
+ . Fixed bug #65593 (Segfault when calling ob_start from output buffering
7
+ callback). (Mike)
6
8
. Fixed bug #69017 (Fail to push to the empty array with the constant value
7
9
defined in class scope). (Laruence)
8
10
. Added NULL byte protection to exec, system and passthru. (Yasuo)
Original file line number Diff line number Diff line change @@ -172,21 +172,22 @@ PHPAPI void php_output_deactivate(TSRMLS_D)
172
172
{
173
173
php_output_handler * * handler = NULL ;
174
174
175
- php_output_header (TSRMLS_C );
175
+ if ((OG (flags ) & PHP_OUTPUT_ACTIVATED )) {
176
+ php_output_header (TSRMLS_C );
176
177
177
- OG (flags ) ^= PHP_OUTPUT_ACTIVATED ;
178
- OG (active ) = NULL ;
179
- OG (running ) = NULL ;
178
+ OG (flags ) ^= PHP_OUTPUT_ACTIVATED ;
179
+ OG (active ) = NULL ;
180
+ OG (running ) = NULL ;
180
181
181
- /* release all output handlers */
182
- if (OG (handlers ).elements ) {
183
- while (SUCCESS == zend_stack_top (& OG (handlers ), (void * ) & handler )) {
184
- php_output_handler_free (handler TSRMLS_CC );
185
- zend_stack_del_top (& OG (handlers ));
182
+ /* release all output handlers */
183
+ if (OG (handlers ).elements ) {
184
+ while (SUCCESS == zend_stack_top (& OG (handlers ), (void * ) & handler )) {
185
+ php_output_handler_free (handler TSRMLS_CC );
186
+ zend_stack_del_top (& OG (handlers ));
187
+ }
188
+ zend_stack_destroy (& OG (handlers ));
186
189
}
187
- zend_stack_destroy (& OG (handlers ));
188
190
}
189
-
190
191
}
191
192
/* }}} */
192
193
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #65593 (ob_start(function(){ob_start();});)
3
+ --FILE--
4
+ <?php
5
+ echo "Test \n" ;
6
+
7
+ ob_start (function (){ob_start ();});
8
+ ?>
9
+ ===DONE===
10
+ --EXPECT--
11
+ Test
12
+
13
+ Fatal error: Cannot destroy active lambda function in /home/mike/src/php-5.5/tests/output/bug65593.php on line 4
You can’t perform that action at this time.
0 commit comments