com php-src: Merge branch 'PHP-5.6': main/output.c
| From: | Michael Wallner | Date: | Wed, 18 Feb 2015 13:04:19 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': main/output.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84989@lists.php.net to get a copy of this message | ||
Commit: b36581aa75ef671b53189bc05fbf791d0e437253
Author: Michael Wallner <mike@php.net> Wed, 18 Feb 2015 14:04:19 +0100
Parents: 86ba1073600530e728361483ee6e3138109c83dd 0d2a2b98c9e88e63e6a3496d6dbf2cc479684427
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b36581aa75ef671b53189bc05fbf791d0e437253
Log:
Merge branch 'PHP-5.6'
* PHP-5.6:
Fixed bug #65593 (Segfault when calling ob_start from output buffering callback)
Bugs:
https://bugs.php.net/65593
Changed paths:
MM main/output.c
Diff:
diff --cc main/output.c
index 2991d0d,456241f..64729ac
--- a/main/output.c
+++ b/main/output.c
@@@ -179,21 -172,22 +179,21 @@@ PHPAPI void php_output_deactivate(void
{
php_output_handler **handler = NULL;
- php_output_header();
+ if ((OG(flags) & PHP_OUTPUT_ACTIVATED)) {
- php_output_header(TSRMLS_C);
- OG(flags) ^= PHP_OUTPUT_ACTIVATED;
- OG(active) = NULL;
- OG(running) = NULL;
+ OG(flags) ^= PHP_OUTPUT_ACTIVATED;
+ OG(active) = NULL;
+ OG(running) = NULL;
- /* release all output handlers */
- if (OG(handlers).elements) {
- while ((handler = zend_stack_top(&OG(handlers)))) {
- php_output_handler_free(handler);
- zend_stack_del_top(&OG(handlers));
+ /* release all output handlers */
+ if (OG(handlers).elements) {
- while (SUCCESS == zend_stack_top(&OG(handlers), (void *) &handler)) {
- php_output_handler_free(handler TSRMLS_CC);
++ while ((handler = zend_stack_top(&OG(handlers)))) {
++ php_output_handler_free(handler);
+ zend_stack_del_top(&OG(handlers));
+ }
- zend_stack_destroy(&OG(handlers));
}
+ zend_stack_destroy(&OG(handlers));
}
-
}
/* }}} */