summaryrefslogtreecommitdiff
path: root/ext/zlib/tests
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2012-03-02 14:16:47 +0000
committerNikita Popov <nikic@php.net>2012-03-02 14:16:47 +0000
commit3748034f86b6d5cefc50c45111be73662c6350d2 (patch)
tree2280434d94fc649492321b855bf1411be831840a /ext/zlib/tests
parent0dcff951828549bc7840a3de02daefcde485e335 (diff)
downloadphp-git-3748034f86b6d5cefc50c45111be73662c6350d2.tar.gz
Merge: Fix bug #61139: gzopen leaks when specifying invalid mode
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 0000000000..eaca00369b
--- /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