xref: /PHP-7.2/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('mbereg_replace')) die('skip mbereg_replace() not available');
7?>
8--FILE--
9<?php
10$var1 = mbereg_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: mbereg_replace(): Pattern is not valid under UTF-8 encoding in %s on line %d
18bool(false)
19===DONE===
20