xref: /PHP-7.2/ext/mbstring/tests/bug73646.phpt (revision 0dbb581c)
1--TEST--
2Bug #73646 (mb_ereg_search_init null pointer dereference)
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
6if (!function_exists('mb_ereg_search_init')) die('skip mb_ereg_search_init() not available');
7?>
8--FILE--
9<?php
10
11$v1=str_repeat("#", -1);
12var_dump(mb_ereg_search_init($v1));
13?>
14--EXPECTF--
15Warning: str_repeat(): Second argument has to be greater than or equal to 0 in %sbug73646.php on line %d
16bool(true)
17