Bug #79756 [NEW]: finfo_file crash (FILEINFO_MIME)
| From: | joris at tactics dot be | Date: | Mon, 29 Jun 2020 09:17:58 +0000 |
| Subject: | Bug #79756 [NEW]: finfo_file crash (FILEINFO_MIME) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-227714@lists.php.net to get a copy of this message | ||
From: joris at tactics dot be
Operating system: Windows
PHP version: 7.3.19
Package: Filesystem function related
Bug Type: Bug
Bug description:finfo_file crash (FILEINFO_MIME)
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 bug report at https://bugs.php.net/bug.php?id=79756&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79756&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79756&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79756&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79756&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79756&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79756&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79756&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79756&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79756&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79756&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79756&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79756&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79756&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79756&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79756&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79756&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79756&r=mysqlcfg