summaryrefslogtreecommitdiff
path: root/ext/fileinfo/tests/bug71527-mb.phpt
blob: 60af049f4fd7a7b8c80a788ba08531df6e4a033a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Bug #71527 Buffer over-write in finfo_open with malformed magic file
--SKIPIF--
<?php
if (!class_exists('finfo'))
	die('skip no fileinfo extension');
--ENV--
USE_ZEND_ALLOC=0
--FILE--
<?php
	$finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527私はガラスを食べられます.magic");
	$info = finfo_file($finfo, __FILE__);
	var_dump($info);
?>
--EXPECTF--
Warning: finfo_open(): Failed to load magic database at '%sbug71527私はガラスを食べられます.magic'. in %sbug71527-mb.php on line %d

Warning: finfo_file() expects parameter 1 to be resource, bool given in %sbug71527-mb.php on line %d
bool(false)