Bug #72682 [Com]: exif_read_data() fails to read all data for some images
| From: | sina dot raudszus at heg dot com | Date: | Mon, 22 Aug 2016 07:44:05 +0000 |
| Subject: | Bug #72682 [Com]: exif_read_data() fails to read all data for some images | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203477@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72682&edit=1
ID: 72682
Comment by: sina dot raudszus at heg dot com
Reported by: r dot helm at helm-software dot de
Summary: exif_read_data() fails to read all data for some
images
Status: Closed
Type: Bug
Package: EXIF related
PHP Version: 7.0.9
Assigned To: kalle
Block user comment: N
Private report: N
New Comment:
as stated in the last comment from [2016-08-03 13:51 UTC]
it is not fixed.
we've got customers who complain about it.
could you do something about this please?
Previous Comments:
------------------------------------------------------------------------
[2016-08-03 15:33:34] kalle@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c6bd054b86c52948505be7409ad8d6488db062f6
Log: Fixed bug #72682 (exif_read_data() fails to read all data for some images)
------------------------------------------------------------------------
[2016-08-03 13:51:09] r dot helm at helm-software dot de
It's not fixed.
Take a look at my previous comment. In exif_process_IFD_in_MAKERNOTE() it goes through
maker_note_array to see if it knowns how to parse the makernote of this image. If it doesn't
find anything it returns FALSE, which was probably intended to mean that it did not process the
makernote.
Previously the result of this function was ignored but now when it returns false parsing is stopped.
So i think it should return TRUE.
------------------------------------------------------------------------
[2016-08-03 10:02:49] kalle@php.net
Please try using this snapshot:
http://snaps.php.net/php-trunk-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Gonna steal this one from you Stas. Me and @remi are working on a patch to hopefully resolve this,
along with a few other EXIF related bugs at the same time.
------------------------------------------------------------------------
[2016-07-29 11:56:12] r dot helm at helm-software dot de
I did some debugging and found that with my test image exif_process_IFD_in_MAKERNOTE() returns FALSE
here: https://github.com/php/php-src/blob/9d582eba7448f1495fae62b13d95d2844ce6b28a/ext/exif/exif.c#L2716
And then the conditional added in that commit
(https://github.com/php/php-src/commit/eebcbd5de38a0f1c2876035402cb770e37476519#diff-c163453976b65334f071d1d4f976ef45R3086)
gets executed and will stop further parsing.
Maybe it should return TRUE at that point because this is not a parsing error?
------------------------------------------------------------------------
[2016-07-28 04:44:11] laruence@php.net
seems caused by this commit: Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
eebcbd5de38a0f1c2876035402cb770e37476519
Stas, could you please take a look?
thanks
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=72682
--
Edit this bug report at https://bugs.php.net/bug.php?id=72682&edit=1