1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Do not allow zend.script_encoding to be set to 'pass'
This commit is contained in:
Alex Dowad
2024-01-21 15:14:29 +02:00
2 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
--TEST--
Don't segfault when zend.script_encoding=pass
--EXTENSIONS--
mbstring
--INI--
zend.multibyte=1
zend.script_encoding=pass
internal_encoding=UTF-8
--FILE--
<?php
print "Done!\n";
?>
--EXPECT--
Warning: PHP Startup: INI setting contains invalid encoding "pass" in Unknown on line 0
Done!

View File

@@ -478,7 +478,7 @@ static zend_result php_mb_zend_encoding_list_parser(const char *encoding_list, s
return php_mb_parse_encoding_list(
encoding_list, encoding_list_len,
(const mbfl_encoding ***)return_list, return_size,
persistent, /* arg_num */ 0, /* allow_pass_encoding */ 1);
persistent, /* arg_num */ 0, /* allow_pass_encoding */ 0);
}
static const zend_encoding *php_mb_zend_internal_encoding_getter(void)