xref: /PHP-8.3/ext/bz2/tests/bug72447.phpt (revision 13f55d5c)
1--TEST--
2Bug #72447: Type Confusion in php_bz2_filter_create()
3--EXTENSIONS--
4bz2
5--FILE--
6<?php
7$input = "AAAAAAAA";
8$param = array('blocks' => $input);
9
10$fp = fopen('testfile', 'w');
11stream_filter_append($fp, 'bzip2.compress', STREAM_FILTER_WRITE, $param);
12fclose($fp);
13?>
14--CLEAN--
15<?php
16unlink('testfile');
17?>
18--EXPECTF--
19Warning: stream_filter_append(): Invalid parameter given for number of blocks to allocate (0) in %s%ebug72447.php on line %d
20