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