xref: /PHP-7.3/ext/mbstring/tests/bug76532.phpt (revision b746e698)
1--TEST--
2Bug #76532 (Integer overflow and excessive memory usage in mb_strimwidth)
3--SKIPIF--
4<?php require 'skipif.inc'; ?>
5--FILE--
6<?php
7$string_to_trim = '得很幸福。有一天,一个长得很丑的老人带着一只木马来到王';
8$width = 2147483647;
9var_dump(mb_strimwidth($string_to_trim, 0, $width));
10?>
11--EXPECT--
12string(81) "得很幸福。有一天,一个长得很丑的老人带着一只木马来到王"
13