1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
archived-php-src/ext/fileinfo/tests/bug71434.phpt
T
Anatol Belski a4280d23dd fileinfo: tests: Sync more upstream tests and fix phpt
Signed-off-by: Anatol Belski <ab@php.net>
2022-10-02 03:02:47 +02:00

23 lines
479 B
PHP

--TEST--
Bug #68735 fileinfo out-of-bounds memory access
--EXTENSIONS--
fileinfo
--FILE--
<?php
$a='#!env python
# -*- coding:utf-8 -*-
from serial import Serial
from sys import exit
';
// As of libmagic >= 5.41 libmagic delivers text/plain for this buffer,
// to be observed further
$finfo = new finfo(FILEINFO_MIME_TYPE);
echo $finfo->buffer($a) . "\n";
$finfo = new finfo();
echo $finfo->buffer($a) . "\n";
?>
--EXPECT--
text/plain
a env python script, ASCII text executable