php-src/ext/mbstring/tests/bug71606.phpt
Christoph M. Becker 418da85f15 Fix #71606: Segmentation fault mb_strcut with HTML-ENTITIES
The HTML decoding filter uses the `opaque` member of mbfl_convert_filter
as buffer, but there was no copy constructor defined, what caused double
frees when the filter is copied (what happens multiple times in mb_strcut(),
for instance).
2017-07-23 12:19:27 +02:00

14 lines
271 B
PHP

--TEST--
Bug #71606 (Segmentation fault mb_strcut + mb_list_encodings)
--SKIPIF--
<?php
if (!extension_loaded('mbstring')) die('skip ext/mbstring not available');
?>
--FILE--
<?php
echo mb_strcut('&quot;', 0, 0, 'HTML-ENTITIES');
echo 'DONE', PHP_EOL;
?>
--EXPECT--
DONE