-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix GH-10834: exif_read_data() cannot read smaller stream wrapper chunk sizes #10924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…chunk sizes php_stream_read() may return less than the requested amount of bytes by design. This patch introduces a static function for exif which reads from the stream in a loop until all the requested bytes are read. Test was Co-authored-by: dotpointer
738cdc5
to
f1314a1
Compare
I'll let @bukka judge this. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general. Just few comments added.
Thanks for checking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just few comments.
Thanks, addressed the review comments. |
php_stream_read() may return less than the requested amount of bytes by design. This patch introduces a static function for exif which reads from the stream in a loop until all the requested bytes are read.
Test was
Co-authored-by: dotpointer
This is attempt nr 2 at fixing this because the previous attempt modified the stream core code which was undesired.
cc'ing @Girgias & @bukka because they looked at the previous version of the patch.