summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/bug_52944.phpt
blob: ed4af3e1578f69578154bd74d2ebfe9d43cb4ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Bug #52944 (segfault with zlib filter and corrupted data)
--SKIPIF--
<?php if (!extension_loaded("zlib")) print "skip"; ?>
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
	die("skip not for windows");
}
if (PHP_OS == 'Darwin') {
	die("skip not for Darwin");
}
--INI--
allow_url_fopen=1
--FILE--
<?php
require dirname(__FILE__) . "/bug_52944_corrupted_data.inc";

$fp = fopen('data://text/plain;base64,' . $data, 'r');
stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
var_dump(fread($fp,1));
var_dump(fread($fp,1));
fclose($fp);
echo "Done.\n";
--EXPECT--
string(0) ""
string(0) ""
Done.