We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a4ec93 commit b9116dcCopy full SHA for b9116dc
ext/bz2/tests/bzcompress_long_inputs.phpt
@@ -0,0 +1,29 @@
1
+--TEST--
2
+bzcompress/bzdecompress long inputs
3
+--EXTENSIONS--
4
+bz2
5
+--INI--
6
+memory_limit=-1
7
+--SKIPIF--
8
+<?php
9
+if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
10
+?>
11
+--FILE--
12
13
+
14
+$string = str_repeat("A", 8000000000);
15
16
+try {
17
+ bzcompress($string, 1);
18
+} catch (\ValueError $e) {
19
+ echo $e->getMessage(), PHP_EOL;
20
+}
21
22
+ bzdecompress($string, 1);
23
24
25
26
27
+--EXPECTF--
28
+bzcompress(): Argument #1 ($data) length must be lower or equal to %d
29
+bzdecompress(): Argument #1 ($data) length must be lower or equal to %d
0 commit comments