Bug #79756 [PATCH]: finfo_file crash (FILEINFO_MIME)
| From: | cmb@php.net | Date: | Mon, 29 Jun 2020 12:27:56 +0000 |
| Subject: | Bug #79756 [PATCH]: finfo_file crash (FILEINFO_MIME) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227725@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79756&edit=1
ID: 79756
Patch added by: cmb@php.net
Reported by: joris at tactics dot be
Summary: finfo_file crash (FILEINFO_MIME)
Status: Verified
Type: Bug
Package: Filesystem function related
Operating System: Windows
PHP Version: 7.3.19
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Fix #79756: finfo_file crash (FILEINFO_MIME)
On GitHub: https://github.com/php/php-src/pull/5778
Patch: https://github.com/php/php-src/pull/5778.patch
Previous Comments:
------------------------------------------------------------------------
[2020-06-29 11:20:09] sjon@php.net
It's a windows specific issue: https://3v4l.org/WF4Ob #FYI
------------------------------------------------------------------------
[2020-06-29 09:35:15] joris at tactics dot be
file can be downloaded here: https://we.tl/t-AfVEKeeUs1
------------------------------------------------------------------------
[2020-06-29 09:26:36] nikic@php.net
In this case, more useful than a backtrace would be the Excel file that triggers it. Is is possible
to share it?
------------------------------------------------------------------------
[2020-06-29 09:20:50] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2020-06-29 09:17:58] joris at tactics dot be
Description:
------------
When trying to detect the mime type of a specific file, the php-cgi.exe process crashes. It only
happens with one specific .xls file I have. This .xls file does open in Excel without issues.
Test script:
---------------
// $filename is path to a specific file that causes the crash.
// I can't seem to upload this file here anywhere :(
$finfo = finfo_open(FILEINFO_MIME);
$mime = finfo_file($finfo, $filename); // CRASH
finfo_close($finfo);
echo $mime;
Expected result:
----------------
application/vnd.ms-excel; charset=binary
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79756&edit=1