summaryrefslogtreecommitdiff
path: root/ext/zlib/tests
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2014-08-06 16:25:12 +0300
committerAndrey Hristov <andrey@php.net>2014-08-06 16:25:12 +0300
commit3dc9bef81916fd203244b8c5fc73d282d333bf9a (patch)
treebd8b70a5810c74f4a2f3b5adacb7f85e731a5953 /ext/zlib/tests
parentf5deb18b205f89cb6708f97f451b43ad5ece4197 (diff)
parentce5efa7adc4637957e70a6f6641a38f484baee99 (diff)
downloadphp-git-3dc9bef81916fd203244b8c5fc73d282d333bf9a.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
Conflicts: ext/fileinfo/data_file.c ext/fileinfo/libmagic/softmagic.c ext/fileinfo/magicdata.patch
Diffstat (limited to 'ext/zlib/tests')
-rw-r--r--ext/zlib/tests/bug67724.gz.gzbin0 -> 171 bytes
-rw-r--r--ext/zlib/tests/bug67724.phpt26
2 files changed, 26 insertions, 0 deletions
diff --git a/ext/zlib/tests/bug67724.gz.gz b/ext/zlib/tests/bug67724.gz.gz
new file mode 100644
index 0000000000..ab1db9258e
--- /dev/null
+++ b/ext/zlib/tests/bug67724.gz.gz
Binary files differ
diff --git a/ext/zlib/tests/bug67724.phpt b/ext/zlib/tests/bug67724.phpt
new file mode 100644
index 0000000000..1e5026f650
--- /dev/null
+++ b/ext/zlib/tests/bug67724.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #67724 (chained zlib filters silently fail with large amounts of data)
+--SKIPIF--
+<?php
+extension_loaded("zlib") or die("skip need ext/zlib");
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+$f = fopen(__DIR__."/bug67724.gz.gz", "rb")
+ or die(current(error_get_last()));
+stream_filter_append($f, "zlib.inflate", STREAM_FILTER_READ, ["window" => 30]);
+stream_filter_append($f, "zlib.inflate", STREAM_FILTER_READ, ["window" => 30]);
+for ($i = 0; !feof($f); $i += strlen(fread($f, 0x1000)))
+ ;
+fclose($f);
+
+var_dump($i);
+
+?>
+DONE
+--EXPECT--
+Test
+int(25600000)
+DONE