mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
- Replace bailout on OOM with UnwindExit - Properly reset various globals that may be accessed during startup Fix GHSA-w8hw-w9fx-j79w (CVE-2026-109618) Fix GHSA-6wmf-4rv5-p3rp (CVE-2026-109619) Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com> Co-authored-by: Jakub Zelenka <bukka@php.net> Co-authored-by: Nora Dossche <7771979+ndossche@users.noreply.github.com> Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
17 lines
432 B
PHP
17 lines
432 B
PHP
--TEST--
|
|
mb_encode_numericentity() doesn't reach hard limit
|
|
--EXTENSIONS--
|
|
mbstring
|
|
--INI--
|
|
memory_limit=8M
|
|
--FILE--
|
|
<?php
|
|
// 2 MB == memory_limit / 4
|
|
$map = [0x0, 0x10FFFF, 0, 0xFFFFFF];
|
|
$string = str_repeat("a", 2 * 1024 * 1024);
|
|
mb_encode_numericentity($string, $map, "UTF-8", true);
|
|
echo "not reached\n";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Allowed memory size of 8388608 bytes exhausted %S(tried to allocate %d bytes) in %s on line %d
|