xref: /PHP-8.2/ext/mbstring/tests/bug72710.phpt (revision 74859783)
1--TEST--
2Bug #72710 (`mb_ereg` causes buffer overflow on regexp compile error)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists('mb_ereg')) die('skip mbregex support not available');
8?>
9--FILE--
10<?php
11mb_ereg('(?<0>a)', 'a');
12?>
13--EXPECTF--
14Warning: mb_ereg(): mbregex compile err: invalid group name <0> in %s on line %d
15