mirror of
https://github.com/php/php-src.git
synced 2026-04-16 20:41:18 +02:00
Oniguruma does not consistently perform this validation itself (at least on older versions), so make sure we check pattern encoding validity on the PHP side.
12 lines
318 B
PHP
12 lines
318 B
PHP
--TEST--
|
|
Bug #77370 (Buffer overflow on mb regex functions - fetch_token)
|
|
--SKIPIF--
|
|
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
|
--FILE--
|
|
<?php
|
|
var_dump(mb_split(" \xfd",""));
|
|
?>
|
|
--EXPECTF--
|
|
Warning: mb_split(): Pattern is not valid under UTF-8 encoding in %s on line %d
|
|
bool(false)
|