Annotation of embedaddon/php/ext/zlib/tests/bug_52944-win.phpt, revision 1.1
1.1 ! 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 windows only");
! 8: }
! 9: --INI--
! 10: allow_url_fopen=1
! 11: --FILE--
! 12: <?php
! 13: require dirname(__FILE__) . "/bug_52944_corrupted_data.inc";
! 14:
! 15: $fp = fopen('data://text/plain;base64,' . $data, 'r');
! 16: stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ);
! 17: var_dump(fread($fp,1));
! 18: var_dump(fread($fp,1));
! 19: fclose($fp);
! 20: echo "Done.\n";
! 21: --EXPECT--
! 22: string(1) "%"
! 23: string(1) "C"
! 24: Done.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>