Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Mar 24, 2023

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.

@ndossche ndossche requested review from Girgias and bukka March 24, 2023 15:05
@ndossche ndossche linked an issue Mar 24, 2023 that may be closed by this pull request
…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
@ndossche ndossche force-pushed the fix-10834-attempt-2 branch from 738cdc5 to f1314a1 Compare March 24, 2023 18:43
@Girgias
Copy link
Member

Girgias commented Mar 26, 2023

I'll let @bukka judge this. :)

@Girgias Girgias removed their request for review March 26, 2023 13:57
Copy link
Member

@bukka bukka left a 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.

@ndossche
Copy link
Member Author

Thanks for checking.
Addressed the review comments by dropping the FIXME comment and renaming the function.

@Girgias Girgias requested a review from bukka May 5, 2023 11:06
Copy link
Member

@bukka bukka left a 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.

@ndossche
Copy link
Member Author

Thanks, addressed the review comments.

@ndossche ndossche requested a review from bukka May 12, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exif_read_data() cannot read smaller stream wrapper chunk sizes

3 participants