Skip to content

Commit f020be2

Browse files
committed
add test
1 parent 6c4fa3b commit f020be2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ext/bz2/tests/gh20620.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug GH-20620 (bzcompress with large source)
3+
--EXTENSIONS--
4+
bz2
5+
--INI--
6+
memory_limit=-1
7+
--FILE--
8+
<?php
9+
try {
10+
bzcompress(str_repeat('1', 4295163906));
11+
} catch (\ValueError $e) {
12+
echo $e->getMessage(), PHP_EOL;
13+
}
14+
?>
15+
--EXPECTF--
16+
bzcompress(): Argument #1 ($data) must be less than or equal to %d

0 commit comments

Comments
 (0)