source: src/router/php7/ext/fileinfo/tests/bug71527-mb.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 665 bytes
Line 
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-mb.php on line %d
17
18Warning: finfo_file() expects parameter 1 to be resource, boolean given in %sbug71527-mb.php on line %d
19bool(false)
Note: See TracBrowser for help on using the repository browser.