summaryrefslogtreecommitdiff
path: root/ext/zlib/tests
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2012-02-19 14:39:29 (GMT)
committerNikita Popov <nikic@php.net>2012-02-19 14:39:29 (GMT)
commitecd13fd184ab46136d893338748fcda6c1458c7f (patch)
treea0c0d943cad99be52daf8a3d7b286e4a7505e8b0 /ext/zlib/tests
parent957029f44aabc4d297ea42c2757de5ef809c61d5 (diff)
downloadphp-ecd13fd184ab46136d893338748fcda6c1458c7f.tar.gz
Fix bug #61139 gzopen leaks when specifying invalid mode
Needs to be merged to 5.4.
Diffstat (limited to 'ext/zlib/tests')
-rw-r--r--ext/zlib/tests/bug61139.phpt14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/zlib/tests/bug61139.phpt b/ext/zlib/tests/bug61139.phpt
new file mode 100644
index 0000000..eaca003
--- /dev/null
+++ b/ext/zlib/tests/bug61139.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #61139 (gzopen leaks when specifying invalid mode)
+--SKIPIF--
+<?php
+if (!extension_loaded('zlib')) {
+ die('skip - zlib extension not loaded');
+}
+?>
+--FILE--
+<?php
+
+gzopen('someFile', 'c');
+--EXPECTF--
+Warning: gzopen(): gzopen failed in %s on line %d