1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Files
archived-php-src/ext/fileinfo/tests/bug79283.phpt
T
Max Semenik bd9f4fa676 Migrate skip checks to --EXTENSIONS--, p2
For rationale, see https://github.com/php/php-src/pull/6787

Make extension checks lowercase, add a special case for opcache
that has internal name not matching .so filename.

Extensions migrated in part 2:
* dom
* exif
* fileinfo
* ffi
2021-04-01 12:08:24 +01:00

21 lines
396 B
PHP

--TEST--
Bug #79283 (Segfault in libmagic patch contains a buffer overflow)
--EXTENSIONS--
fileinfo
--FILE--
<?php
$magic_file = __DIR__ . '/bug79283.db';
file_put_contents($magic_file, "
0 regex \\0\\0\\0\\0 Test
");
$finfo = new finfo(FILEINFO_NONE, $magic_file);
var_dump($finfo->buffer("buffer\n"));
?>
--CLEAN--
<?php
unlink(__DIR__ . '/bug79283.db');
?>
--EXPECT--
string(10) "ASCII text"