mirror of
https://github.com/php/php-src.git
synced 2026-03-25 16:52:18 +01:00
Apparently, bug 78633 has now really been fixed; the former fix only catered to the buffer overflow, but yielded a wrong result. Also, the order of the named captures has been fixed.
19 lines
399 B
PHP
19 lines
399 B
PHP
--TEST--
|
|
Bug #78633 (Heap buffer overflow (read) in mb_eregi)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
|
|
if (!function_exists('mb_eregi')) die('skip mb_eregi function not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$res = mb_eregi(".+Isssǰ", ".+Isssǰ");
|
|
if ($res === 1 || $res === false) {
|
|
echo "ok\n";
|
|
} else {
|
|
var_dump($res);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
ok
|