summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-06-28 23:06:08 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-06-28 23:06:08 +0200
commita7101415cb19ec01aacaa0ababb88d02c6a1631d (patch)
tree309f7326e1706d5310e68b64423c372fbfbe4ec5 /ext/mbstring/tests
parentdb7ead0768076da486a9c98264061113233deb7f (diff)
parent00c0d7702ce92ed132ad7234ca63bdec28e56421 (diff)
downloadphp-git-a7101415cb19ec01aacaa0ababb88d02c6a1631d.tar.gz
Merge branch 'PHP-7.2'
Diffstat (limited to 'ext/mbstring/tests')
-rw-r--r--ext/mbstring/tests/bug76532.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/mbstring/tests/bug76532.phpt b/ext/mbstring/tests/bug76532.phpt
new file mode 100644
index 0000000000..e61e403dbf
--- /dev/null
+++ b/ext/mbstring/tests/bug76532.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #76532 (Integer overflow and excessive memory usage in mb_strimwidth)
+--SKIPIF--
+<?php require 'skipif.inc'; ?>
+--FILE--
+<?php
+$string_to_trim = '得很幸福。有一天,一个长得很丑的老人带着一只木马来到王';
+$width = 2147483647;
+var_dump(mb_strimwidth($string_to_trim, 0, $width));
+?>
+--EXPECT--
+string(81) "得很幸福。有一天,一个长得很丑的老人带着一只木马来到王" \ No newline at end of file