xref: /PHP-7.3/ext/mbstring/tests/bug72994.phpt (revision 40fe50da)
1--TEST--
2Bug #72994 (mbc_to_code() out of bounds read)
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
6if (!function_exists('mb_ereg_replace')) die('skip mb_ereg_replace() not available');
7?>
8--FILE--
9<?php
10$var1 = mb_ereg_replace($var-232338951,NULL,NULL,NULL);
11var_dump($var1);
12?>
13===DONE===
14--EXPECTF--
15Notice: Undefined variable: var in %s on line %d
16
17Warning: mb_ereg_replace(): Pattern is not valid under UTF-8 encoding in %sbug72994.php on line %d
18bool(false)
19===DONE===
20