mirror of
https://github.com/php/php-src.git
synced 2026-04-22 07:28:09 +02:00
bd9f4fa676
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
21 lines
396 B
PHP
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"
|