Bug #50845 [Opn->Csd]: exif_read_data() returns corrupted exif headers

From: Date: Tue, 14 Jun 2016 17:51:38 +0000
Subject: Bug #50845 [Opn->Csd]: exif_read_data() returns corrupted exif headers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201613@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50845&edit=1 ID: 50845 Updated by: stas@php.net Reported by: zerkella at i dot ua Summary: exif_read_data() returns corrupted exif headers -Status: Open +Status: Closed Type: Bug Package: EXIF related Operating System: * PHP Version: 5.*, 6 Block user comment: N Private report: N New Comment: Automatic comment on behalf of matma.rex@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=1ab5a1b432a4b4c62171864bd1b545616e1b07db Log: Fix #50845: exif_process_IFD_TAG: Use the right offset if reading from stream Previous Comments: ------------------------------------------------------------------------ [2015-05-17 08:43:25] steinsplitter-wiki at live dot com only for the record: https://phabricator.wikimedia.org/T97253 ------------------------------------------------------------------------ [2010-01-26 10:53:42] zerkella at i dot ua Description: ------------ exif_read_data returns bad values for headers for some photos. Headers look like corrupted during extraction from file - like they were mixed with and overwritten by other exif headers. I tried to check Exif headers for same photos with XnView - it shows them nicely. So the problem is somewhere in php. Files to reproduce this bug: http://i.i.ua/php_bugs/62418.jpg http://i.i.ua/php_bugs/39908.jpg http://i.i.ua/php_bugs/21260.jpg Reproduce code: --------------- var_dump(exif_read_data('http://i.i.ua/php_bugs/62418.jpg', 'EXIF')); var_dump(exif_read_data('http://i.i.ua/php_bugs/39908.jpg', 'EXIF')); Expected result: ---------------- array(34) { ... ["Make"]=> string(11) "FUJI PHOTO FILM CO., LTD." ["Model"]=> string(7) "SLP800" ... ["Software"]=> string(3) "FDi V4.5 / FRONTIER330-3.0-0E-5" ... ["DateTimeOriginal"]=> string(11) "2005:08:04 12:05:55" ... } array(49) { ... ["ApertureFNumber"]=> string(12) "f8.0" ... ["Make"]=> string(4) "Canon" ["Model"]=> string(2) "Canon EOS DIGITAL REBEL" ... ["ExposureTime"]=> string(13) "6250/1000000" ["FNumber"]=> string(13) "8.0" ["DateTimeOriginal"]=> string(19) "2005:05:14 19:00:41" ... } Actual result: -------------- array(34) { ... ["Make"]=> string(11) "04 12:05:55" ["Model"]=> string(7) "M CO., " ... ["Software"]=> string(3) "TD." ... ["DateTimeOriginal"]=> string(11) "-3.0-0E-518" ... } array(49) { ... ["ApertureFNumber"]=> string(12) "f/74099368.0" ... ["Make"]=> string(4) "Exif" ["Model"]=> string(2) "I*" ... ["ExposureTime"]=> string(13) "1111490560/15" ["FNumber"]=> string(13) "1111490560/15" ["DateTimeOriginal"]=> NULL ... } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=50845&edit=1

« previous php.bugs (#201613) next »