xref: /php-src/ext/mbstring/tests/bug77381.phpt (revision 74859783)
1--TEST--
2Bug #77381 (heap buffer overflow in multibyte match_at)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists('mb_ereg')) die('skip mb_ereg() not available');
8?>
9--FILE--
10<?php
11var_dump(mb_ereg("000||0\xfa","0"));
12var_dump(mb_ereg("(?i)000000000000000000000\xf0",""));
13var_dump(mb_ereg("0000\\"."\xf5","0"));
14var_dump(mb_ereg("(?i)FFF00000000000000000\xfd",""));
15?>
16--EXPECTF--
17Warning: mb_ereg(): Pattern is not valid under UTF-8 encoding in %s on line %d
18bool(false)
19
20Warning: mb_ereg(): Pattern is not valid under UTF-8 encoding in %s on line %d
21bool(false)
22
23Warning: mb_ereg(): Pattern is not valid under UTF-8 encoding in %s on line %d
24bool(false)
25
26Warning: mb_ereg(): Pattern is not valid under UTF-8 encoding in %s on line %d
27bool(false)
28