mirror of
https://github.com/php/php-src.git
synced 2026-04-29 11:13:36 +02:00
Fixed bug #44394 (Last two bytes missing from output)
This commit is contained in:
@@ -126,6 +126,7 @@ PHP NEWS
|
||||
- Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
|
||||
- Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
|
||||
|
||||
- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
|
||||
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
|
||||
(frode at coretrek dot com, Nuno)
|
||||
- Fixed bug #44214 (Crash using preg_replace_callback() and global variable).
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #44394 Last two bytes missing from output
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$string = "<a href='a?q=1'>asd</a>";
|
||||
|
||||
output_add_rewrite_var('a', 'b');
|
||||
|
||||
echo $string;
|
||||
|
||||
ob_flush();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
<a href='a?q=1&a=b'>asd</a>
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #44394 (Last two bytes missing from output) with session.use_trans_id
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
ini_set('session.use_trans_sid', 1);
|
||||
|
||||
session_start();
|
||||
|
||||
ob_start();
|
||||
|
||||
$string = "<a href='a?q=1'>asd</a>";
|
||||
|
||||
output_add_rewrite_var('a', 'b');
|
||||
|
||||
echo $string;
|
||||
|
||||
ob_flush();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
<a href='a?q=1&PHPSESSID=%s&a=b'>asd</a>
|
||||
@@ -1007,7 +1007,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;
|
||||
|
||||
Reference in New Issue
Block a user