xref: /PHP-8.3/ext/fileinfo/tests/bug71434.phpt (revision a4280d23)
1--TEST--
2Bug #68735 fileinfo out-of-bounds memory access
3--EXTENSIONS--
4fileinfo
5--FILE--
6<?php
7$a='#!env python
8# -*- coding:utf-8 -*-
9
10from serial import Serial
11from sys import exit
12';
13// As of libmagic >= 5.41 libmagic delivers text/plain for this buffer,
14// to be observed further
15$finfo = new finfo(FILEINFO_MIME_TYPE);
16echo $finfo->buffer($a) . "\n";
17$finfo = new finfo();
18echo $finfo->buffer($a) . "\n";
19?>
20--EXPECT--
21text/plain
22a env python script, ASCII text executable
23