From: Ilia Alshanetsky Date: Wed, 11 Feb 2004 17:00:56 +0000 (+0000) Subject: MFH: Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() X-Git-Tag: php-4.3.5RC3~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca53f687299377bdc90612df1289dfb383af729e;p=php MFH: Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() may result in data loss). --- diff --git a/NEWS b/NEWS index 8fe8df30a9..5a9214f605 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ PHP 4 NEWS - Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi) - Fixed bug #27026 (Added "cgi.nph" php.ini option to allow forcing of the 'Status: 200' header that is not normally needed). (Ilia) +- Fixed bug #26862 (ob_flush() followed by output_reset_rewrite_vars() may + result in data loss). (Ilia, scottmacvicar at ntlworld dot com) - Fixed bug #26758 (FastCGI exits immediately with status 255). (Ilia, tcarter at noggin dot com dot au) - Fixed bug #26653 (open_basedir incorrectly resolved on win32). (Ilia, diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c index 47e2c8759f..339f1ad889 100644 --- a/ext/standard/url_scanner_ex.c +++ b/ext/standard/url_scanner_ex.c @@ -1,5 +1,5 @@ -/* Generated by re2c 0.5 on Thu Apr 17 02:53:49 2003 */ -#line 1 "/usr/src/web/php/php4/ext/standard/url_scanner_ex.re" +/* Generated by re2c 0.5 on Wed Feb 11 11:33:22 2004 */ +#line 1 "/home/rei/php4/ext/standard/url_scanner_ex.re" /* +----------------------------------------------------------------------+ | PHP Version 4 | @@ -918,7 +918,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char * size_t len; if (BG(url_adapt_state_ex).url_app.len != 0) { - *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode&PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC); + *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END|PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC); if (sizeof(uint) < sizeof(size_t)) { if (len > UINT_MAX) len = UINT_MAX; diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index 7f85c06b38..c45c930541 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -417,7 +417,7 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char * size_t len; if (BG(url_adapt_state_ex).url_app.len != 0) { - *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode&PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC); + *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END|PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC); if (sizeof(uint) < sizeof(size_t)) { if (len > UINT_MAX) len = UINT_MAX;