|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73115 exif_read_data triggers warning on reading binary strings
Submitted: 2016-09-19 15:12 UTC Modified: 2017-07-09 15:50 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: lee dot traynor at skeptic dot de Assigned: kalle (profile)
Status: Closed Package: EXIF related
PHP Version: 7.0.11 OS: Windows 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: lee dot traynor at skeptic dot de
New email:
PHP Version: OS:


 [2016-09-19 15:12 UTC] lee dot traynor at skeptic dot de
On encountering a binary string in exif data (e.g. makernote) exif_read_data () terminates reading, returns the exif tags successfully read and issues a warning about unreadable data. This does not occur in php <= 5.6.16, where the full set of exif tags is returned without warning. This bug may be related to Bug #72819 EXIF thumbnails not read anymore.

Test script:
exif_read_data ("img_0001.jpg");

Expected result:
All exif tags returned without error.

Actual result:
Only exif tags prior to "makernote" (which is a binary string) are returned and a warning issued.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-20 13:27 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: kalle
 [2017-07-07 10:32 UTC]
-Status: Assigned +Status: Feedback
 [2017-07-07 10:32 UTC]

Could you please provide me with a test image?

 [2017-07-07 15:23 UTC] lee dot traynor at skeptic dot de
-Status: Feedback +Status: Assigned
 [2017-07-07 15:23 UTC] lee dot traynor at skeptic dot de
Try this image:

I get:

PHP Warning:  exif_read_data(IMG_0001_D.JPG): IFD data bad offset: 0xFFFFFCAC length 0x08C8
 [2017-07-08 01:00 UTC]
Thank you very much Lee, I do some testings with this one!
 [2017-07-08 01:33 UTC]
-Status: Assigned +Status: Closed
 [2017-07-08 01:33 UTC]
I can confirm that this bug has been fixed by recent patches to the EXIF extension! I added a test case for this to php-src:;a=commit;h=469206c84e502e3e349655b802899d5e4d560f72
 [2017-07-09 15:43 UTC] lee dot traynor at skeptic dot de
-Status: Closed +Status: Assigned
 [2017-07-09 15:43 UTC] lee dot traynor at skeptic dot de
Sorry, I am still getting the exact same error message on PHP 7.0.21.
 [2017-07-09 15:50 UTC]
-Status: Assigned +Status: Closed
 [2017-07-09 15:50 UTC]
That is true, these changes are currently only in the 7.2 branch, I'm not sure if these changes can all be safely ported to 5.6/7.0/7.1 as there have been many changes to the exif extension recently. I will try to investigate further
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 13 00:01:31 2024 UTC