|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79756 finfo_file crash (FILEINFO_MIME)
Submitted: 2020-06-29 09:17 UTC Modified: 2020-06-29 12:27 UTC
From: joris at tactics dot be Assigned: cmb (profile)
Status: Closed Package: Filesystem function related
PHP Version: 7.3.19 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: joris at tactics dot be
New email:
PHP Version: OS:


 [2020-06-29 09:17 UTC] joris at tactics dot be
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
echo $mime;

Expected result:
application/; charset=binary


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-06-29 09:20 UTC]
-Status: Open +Status: Feedback
 [2020-06-29 09:20 UTC]
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 for *NIX and 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:26 UTC]
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:35 UTC] joris at tactics dot be
-Status: Feedback +Status: Open
 [2020-06-29 09:35 UTC] joris at tactics dot be
file can be downloaded here:
 [2020-06-29 11:20 UTC]
It's a windows specific issue: #FYI
 [2020-06-29 11:45 UTC]
-Assigned To: +Assigned To: cmb
 [2020-06-29 12:27 UTC]
-Status: Assigned +Status: Verified
 [2020-06-29 12:27 UTC]
The following pull request has been associated:

Patch Name: Fix #79756: finfo_file crash (FILEINFO_MIME)
On GitHub:
 [2020-06-29 15:48 UTC]
Automatic comment on behalf of
Log: Fix #79756: finfo_file crash (FILEINFO_MIME)
 [2020-06-29 15:48 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 09:01:30 2024 UTC