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