xref: /PHP-5.5/ext/fileinfo/tests/bug71527.phpt (revision fe13566c)
1--TEST--
2Bug #71527 Buffer over-write in finfo_open with malformed magic file
3--SKIPIF--
4<?php
5if (!class_exists('finfo'))
6	die('skip no fileinfo extension');
7--ENV--
8USE_ZEND_ALLOC=0
9--FILE--
10<?php
11	$finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527.magic");
12	$info = finfo_file($finfo, __FILE__);
13	var_dump($info);
14?>
15--EXPECTF--
16Warning: finfo_open(): Failed to load magic database at '%sbug71527.magic'. in %sbug71527.php on line %d
17
18Warning: finfo_file() expects parameter 1 to be resource, boolean given in %sbug71527.php on line %d
19bool(false)
20