Fix #50845: exif_process_IFD_TAG: Use the right offset if reading from stream#1943
Closed
MatmaRex wants to merge 1 commit intophp:PHP-5.6from
Closed
Fix #50845: exif_process_IFD_TAG: Use the right offset if reading from stream#1943MatmaRex wants to merge 1 commit intophp:PHP-5.6from
MatmaRex wants to merge 1 commit intophp:PHP-5.6from
Conversation
…m stream When the location of the data is outside of the range we have preloaded (for example, if it's before the beginning of the IFD structure), we have to read it from the stream into a separate buffer. The offset calculations in this case were incorrect, resulting in bogus values being read for the affected fields (sometimes parts of other fields, sometimes binary data). The included test image, sourced from [1], is in the public domain. [1] https://commons.wikimedia.org/wiki/File:U.S._Marines_Prepare_to_board_an_MV-22_Osprey_160509-M-AF202-041.jpg
Contributor
|
merged |
hhvm-bot
pushed a commit
to facebook/hhvm
that referenced
this pull request
Jul 14, 2016
…ream Summary: When the location of the data is outside of the range we have preloaded (for example, if it's before the beginning of the IFD structure), we have to read it from the stream into a separate buffer. The offset calculations in this case were incorrect, resulting in bogus values being read for the affected fields (sometimes parts of other fields, sometimes binary data). The included test image, sourced from [1], is in the public domain. [1] https://commons.wikimedia.org/wiki/File:U.S._Marines_Prepare_to_board_an_MV-22_Osprey_160509-M-AF202-041.jpg (This is the same fix as PHP commit c794d53c0377be960a17c3279715436e405b83f4 / php/php-src#1943.) Closes #7208 Reviewed By: Orvid Differential Revision: D3518486 fbshipit-source-id: e0560e9455177d873b9494f736fb140810b25633
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the location of the data is outside of the range we have
preloaded (for example, if it's before the beginning of the IFD
structure), we have to read it from the stream into a separate buffer.
The offset calculations in this case were incorrect, resulting in
bogus values being read for the affected fields (sometimes parts of
other fields, sometimes binary data).
The included test image, sourced from https://commons.wikimedia.org/wiki/File:U.S._Marines_Prepare_to_board_an_MV-22_Osprey_160509-M-AF202-041.jpg, is in the public domain.
This is a version of pull request #1581 with an added test and more detailed summary. I debugged this independently (https://phabricator.wikimedia.org/T137635) before finding that it already has a patch pending, grumble.
This is my first contribution to PHP, do I need to do anything special?