diff options
author | Stanislav Malyshev <stas@php.net> | 2016-06-18 22:11:23 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2016-06-18 22:11:23 -0700 |
commit | 8c0133f0ebb956af305bda3b1d2066751d12a5b9 (patch) | |
tree | 552300da0a1e1c4dd1273f22122d0d0159a9ae8a /ext/bz2/tests | |
parent | af2c332f41c80ff0c138fbd03248be36b545c202 (diff) | |
parent | 42b2d7fec54ec7ea0bc352c502674d6192c8a6fa (diff) | |
download | php-git-8c0133f0ebb956af305bda3b1d2066751d12a5b9.tar.gz |
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
Fix bug #72447: Type Confusion in php_bz2_filter_create()
Conflicts:
ext/bz2/bz2_filter.c
Diffstat (limited to 'ext/bz2/tests')
-rw-r--r-- | ext/bz2/tests/bug72447.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/bz2/tests/bug72447.phpt b/ext/bz2/tests/bug72447.phpt new file mode 100644 index 0000000000..0df4cb177b --- /dev/null +++ b/ext/bz2/tests/bug72447.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #72447: Type Confusion in php_bz2_filter_create() +--SKIPIF-- +<?php if (!extension_loaded("bz2")) print "skip"; ?> +--FILE-- +<?php +$input = "AAAAAAAA"; +$param = array('blocks' => $input); + +$fp = fopen('testfile', 'w'); +stream_filter_append($fp, 'bzip2.compress', STREAM_FILTER_WRITE, $param); +fclose($fp); +?> +--EXPECTF-- +Warning: stream_filter_append(): Invalid parameter given for number of blocks to allocate. (0) in %s/bug72447.php on line %d |