Bug #58023 [Fbk->NoF]: Fileinfo causes Apache to crash when trying to get MIME for a 0 byte file

From: Date: Sun, 26 Apr 2015 04:22:17 +0000
Subject: Bug #58023 [Fbk->NoF]: Fileinfo causes Apache to crash when trying to get MIME for a 0 byte file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192345@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=58023&edit=1 ID: 58023 Updated by: php-bugs@lists.php.net Reported by: lunet6 at gmail dot com Summary: Fileinfo causes Apache to crash when trying to get MIME for a 0 byte file -Status: Feedback +Status: No Feedback Type: Bug Package: *General Issues Operating System: Windows XP SP2/ Vista PHP Version: 5.2.1 Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2015-04-15 15:10:41] cmb@php.net Does this issue still persist? I have not been able to reproduce it on Windows 7 with recent PHP versions. Maybe the magic file delivered with XAMPP was broken? ------------------------------------------------------------------------ [2008-01-31 05:29:19] lunet6 at gmail dot com Description: ------------ 1. Have the code in the "reproduce code" section 2. In windows, open Notepad, and save the blank txt file as c:\a.txt. The file size should be 0 bytes. 3. execute the code Reproduce code: --------------- $handle = finfo_open(FILEINFO_MIME,'c:\xampp\php\extras\magic'); if (!$handle) { echo "Opening fileinfo database failed"; exit(); } //echo var_dump($handle); $file1 = "c:\a.txt"; $mime_type = finfo_file($handle,$file1); echo $mime_type; finfo_close($handle); Expected result: ---------------- Apache should not crash. It should return application/empty or similar result. Actual result: -------------- Problem Event Name: APPCRASH Application Name: apache.exe Application Version: 2.2.6.0 Application Timestamp: 47319811 Fault Module Name: ntdll.dll Fault Module Version: 6.0.6000.16386 Fault Module Timestamp: 4549bdc9 Exception Code: c0000005 Exception Offset: 00062086 OS Version: 6.0.6000.2.0.0.768.3 Locale ID: 1033 Additional Information 1: b20d Additional Information 2: 39e3e624db72f4805472ecca389bc21b Additional Information 3: b9e4 Additional Information 4: dd248f9918d6cf47cd723c28e9132481 Read our privacy statement: http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=58023&edit=1

« previous php.bugs (#192345) next »