xref: /PHP-8.0/ext/fileinfo/tests/bug71527-mb.phpt (revision 41b096b3)
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, __DIR__ . DIRECTORY_SEPARATOR . "bug71527私はガラスを食べられます.magic");
12    var_dump($finfo);
13?>
14--EXPECTF--
15Warning: finfo_open(): Failed to load magic database at "%sbug71527私はガラスを食べられます.magic" in %sbug71527-mb.php on line %d
16bool(false)
17