xref: /PHP-7.4/ext/mbstring/tests/bug79371.phpt (revision 1fdffd1c)
1--TEST--
2Bug #79371 (mb_strtolower (UTF-32LE): stack-buffer-overflow)
3--SKIPIF--
4<?php
5if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
6?>
7--FILE--
8<?php
9$bytes = array(0xef, 0xbf, 0xbd, 0xef);
10$str = implode(array_map("chr", $bytes));
11var_dump(bin2hex(mb_strtolower($str, "UTF-32LE")));
12?>
13--EXPECT--
14string(8) "3f000000"
15