xref: /PHP-8.2/ext/fileinfo/tests/bug71527.phpt (revision bd9f4fa6)
1--TEST--
2Bug #71527 Buffer over-write in finfo_open with malformed magic file
3--EXTENSIONS--
4fileinfo
5--ENV--
6USE_ZEND_ALLOC=0
7--FILE--
8<?php
9    $finfo = finfo_open(FILEINFO_NONE, __DIR__ . DIRECTORY_SEPARATOR . "bug71527.magic");
10    var_dump($finfo);
11?>
12--EXPECTF--
13Warning: finfo_open(): Failed to load magic database at "%sbug71527.magic" in %sbug71527.php on line %d
14bool(false)
15