xref: /PHP-7.3/ext/mbstring/tests/bug78633.phpt (revision c55d09c2)
1--TEST--
2Bug #78633 (Heap buffer overflow (read) in mb_eregi)
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
6if (!function_exists('mb_eregi')) die('skip mb_eregi function not available');
7?>
8--FILE--
9<?php
10$res = mb_eregi(".+Isssǰ", ".+Isssǰ");
11if ($res === 1 || $res === false) {
12    echo "ok\n";
13} else {
14    var_dump($res);
15}
16?>
17--EXPECT--
18ok
19