From: bluewind at xinu dot at Operating system: Arch Linux PHP version: 5.4.15 Package: Unknown/Other Function Bug Type: Bug Bug description:mimetype detection segfaults on mp3 file
Description: ------------ Uploading an mp3 file or using fileinfo to check the mimetype of an mp3 file causes a crash. 5.4.14 works fine, 5.4.15 crashes. I bisected it down to 10367fa7c6a4a2cf9bee02d8905e284185428f09. Doesn't seem to happen for every mp3 file so here's the one I used: http://flo.server-speed.net/tmp/php-bug-mp3/test.mp3 If you need any more information to track it down or can't reproduce it, I'm happy to help. Test script: --------------- <?php function mimetype($file) { $fileinfo = new finfo(FILEINFO_MIME_TYPE); $mimetype = $fileinfo->file($file); return $mimetype; } echo mimetype ("test.mp3")."\n"; Expected result: ---------------- Output should be "audio/mpeg" and it shouldn't crash. Actual result: -------------- *** Error in `/home/flo/git/php-src/sapi/cgi/php-cgi': munmap_chunk(): invalid pointer: 0x00007f31e3dc24f0 *** ======= Backtrace: ========= /usr/lib/libc.so.6(+0x788ae)[0x7f31e258a8ae] /home/flo/git/php-src/sapi/cgi/php-cgi[0x5860d6] /home/flo/git/php-src/sapi/cgi/php-cgi[0x5825ee] /home/flo/git/php-src/sapi/cgi/php-cgi[0x5820bc] /home/flo/git/php-src/sapi/cgi/php-cgi[0x57fef3] /home/flo/git/php-src/sapi/cgi/php-cgi[0x580f87] /home/flo/git/php-src/sapi/cgi/php-cgi[0x580d6a] /home/flo/git/php-src/sapi/cgi/php-cgi[0x573bbc] /home/flo/git/php-src/sapi/cgi/php-cgi[0x573dd1] /home/flo/git/php-src/sapi/cgi/php-cgi[0x7cd0b2] /home/flo/git/php-src/sapi/cgi/php-cgi[0x7cd71c] /home/flo/git/php-src/sapi/cgi/php-cgi(execute+0x369)[0x7cc671] /home/flo/git/php-src/sapi/cgi/php-cgi(zend_execute_scripts+0x23c)[0x79381c] /home/flo/git/php-src/sapi/cgi/php-cgi(php_execute_script+0x370)[0x70ffd8] /home/flo/git/php-src/sapi/cgi/php-cgi[0x8370bb] /usr/lib/libc.so.6(__libc_start_main+0xf5)[0x7f31e2533a15] /home/flo/git/php-src/sapi/cgi/php-cgi[0x41fca9] -- Edit bug report at https://bugs.php.net/bug.php?id=64830&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64830&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64830&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64830&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64830&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64830&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64830&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64830&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64830&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64830&r=support Expected behavior: https://bugs.php.net/fix.php?id=64830&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64830&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64830&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64830&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64830&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64830&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64830&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64830&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64830&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64830&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64830&r=mysqlcfg