Annotation of embedaddon/php/ext/zlib/tests/bug_52944.phpt, revision 1.1.1.2

1.1.1.2 ! misho       1: --TEST--
        !             2: Bug #52944 (segfault with zlib filter and corrupted data)
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("zlib")) print "skip"; ?>
        !             5: <?php
        !             6: if (substr(PHP_OS, 0, 3) == 'WIN') {
        !             7:        die("skip not for windows");
        !             8: }
        !             9: if (PHP_OS == 'Darwin') {
        !            10:        die("skip not for Darwin");
        !            11: }
        !            12: --INI--
        !            13: allow_url_fopen=1
        !            14: --FILE--
        !            15: <?php
        !            16: require dirname(__FILE__) . "/bug_52944_corrupted_data.inc";
        !            17: 
        !            18: $fp = fopen('data://text/plain;base64,' . $data, 'r');
        !            19: stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
        !            20: var_dump(fread($fp,1));
        !            21: var_dump(fread($fp,1));
        !            22: fclose($fp);
        !            23: echo "Done.\n";
        !            24: --EXPECT--
        !            25: string(0) ""
        !            26: string(0) ""
        !            27: Done.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>