summaryrefslogtreecommitdiff
path: root/ext/zlib/tests
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2012-03-05 15:38:24 (GMT)
committerMichael Wallner <mike@php.net>2012-03-05 15:38:24 (GMT)
commit39d2996c57a991432eca023f91e92a480cabe276 (patch)
treeeb3c6bbd8bc0c1dc36c7f50e28e9bbba811cb59e /ext/zlib/tests
parentf05886dbcb8446c2f3da39445a97ec2278f9f8e6 (diff)
downloadphp-39d2996c57a991432eca023f91e92a480cabe276.tar.gz
MFH: Fixed bug #61287 (A particular string fails to decompress)
Diffstat (limited to 'ext/zlib/tests')
-rw-r--r--ext/zlib/tests/bug61287.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/zlib/tests/bug61287.phpt b/ext/zlib/tests/bug61287.phpt
new file mode 100644
index 0000000..769446a
--- /dev/null
+++ b/ext/zlib/tests/bug61287.phpt
@@ -0,0 +1,24 @@
+--TEST--
+bug #61287 - inflate needs the terminating null byte
+--SKIPIF--
+<?php extension_loaded("zlib") or die("SKIP need zlib");
+--FILE--
+<?php
+$array = array(
+ 'region_id' => 1,
+ 'discipline' => 23,
+ 'degrees' => array(),
+ 'country_id' => 27
+);
+
+$serialized = serialize($array);
+
+$deflated = gzdeflate($serialized, 9);
+$inflated = gzinflate($deflated);
+
+echo strlen($inflated),"\n";
+?>
+Done
+--EXPECT--
+92
+Done