xref: /php-src/ext/mbstring/tests/bug78559.phpt (revision 74859783)
1--TEST--
2Bug #78559 (#78559	Heap buffer overflow in mb_eregi)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists('mb_ereg')) die('skip mb_ereg() not available');
8?>
9--FILE--
10<?php
11$str = "5b5b5b5b5b5b5b492a5bce946b5c4b5d5c6b5c4b5d5c4b5d1cceb04b5d1cceb07a73717e4b1c52525252525252525252525252525252525252525252525252492a5bce946b5c4b5d5c6b5c4b5d5c4b5d1cceb04b5d1cceb07a73717e4b1c1cceb04b5d1cceb07a73717e4b1c302c36303030ceb07b7bd2a15c305c30663f436f6e74655c5238416711087b363030302c36303030ceb07b7b7b7b7b7b7b363030302c36303030ceb07b7b7b7b7b7b7b4a01";
12$str = hex2bin($str);
13var_dump(mb_eregi($str, $str));
14?>
15--EXPECT--
16bool(false)
17