diff options
author | Nikita Popov <nikic@php.net> | 2012-02-19 14:39:29 +0000 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2012-02-19 14:39:29 +0000 |
commit | f9e8477b0411432fc85aaa2933f4950a8aaa0748 (patch) | |
tree | 75b3fe2f5e709be0f5b56a3c75bc710965a80d5d /ext/zlib/tests | |
parent | bfcc199f2867efdf667dbc68a3325cf92d71d3f8 (diff) | |
download | php-git-f9e8477b0411432fc85aaa2933f4950a8aaa0748.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.phpt | 14 |
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 |