exif_read_data() returns corrupted exif headers
| Bug #50845 | exif_read_data() returns corrupted exif headers | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2010-01-26 10:53 UTC | Modified: | 2010-01-26 11:05 UTC |
|
||||||||||
| From: | zerkella at i dot ua | Assigned: | ||||||||||||
| Status: | Closed | Package: | EXIF related | |||||||||||
| PHP Version: | 5.*, 6 | OS: | * | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2010-01-26 10:53 UTC] 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 ... }
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2016-06-14 17:51 UTC] stas@php.net
-Status: Open +Status: Closed