php-src/ext/zlib/tests/bug_52944.phpt
Ferenc Kovacs 5d67e8617b the darwin specific test fails for me with the same output which is the expected for the original test
I couldn't find anybody who managed to see this test passing, but I found a bunch of other reports on
qa.php.net/reports and on google which do see this test failing on mac.
if this change causes you to have this test failing on Mac, please drop me a mail so we can improve
the current test so it passes for everybody.
2014-11-27 00:08:40 +01:00

25 lines
626 B
PHP

--TEST--
Bug #52944 (segfault with zlib filter and corrupted data)
--SKIPIF--
<?php if (!extension_loaded("zlib")) print "skip"; ?>
--INI--
allow_url_fopen=1
--FILE--
<?php
/* NOTE this test can fail on asm builds of zlib 1.2.5 or
1.2.7 on at least Windows and Darwin. Using unoptimized
zlib build fixes the issue. */
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.