Repository navigation
Raise an EOFError when seeking too far in PNG - #4528
Merged
Merged
Conversation
Member
|
@pmrowla Please could you have a look at this PR? Thank you! |
Contributor
|
This has the same effect as what I suggested in #4519, and it's simpler. Testing w/scikit-image also shows the the original downstream issue would be resolved. |
Member
|
@radarhere Thoughts about the doccheck failure? I checked the branch out locally and cannot reproduce. I'd restart it, but the restart button is now missing for me on this repo on Travis CI. |
Member
Author
Member
|
And I had 2.4.1 locally. Thanks! |
This was referenced Apr 6, 2020
Closed
1 task done
phue
added a commit
to phue/scikit-image-feedstock
that referenced
this pull request
Apr 21, 2020
There is a regression in the latest Pillow releases python-pillow/Pillow#4528 The fix has been merged but not released yet
2 of 5 tasks
Contributor
|
Kinda nudge toward a release since this issue seems to affecting one passionate user for a release |
Member
|
Thanks for the nudge! We'll do a release this weekend, keep an eye on #4354 (comment). |
Member
Author
|
Pillow 7.1.2 has now been released with this fix. |
Contributor
|
Thanks! |
3 tasks done
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.
Resolves #4518
Looking at PngImagePlugin, there's no need for
n_framesoris_animatedto use property decorators - they can just be regular properties.You might think this is just a simplification of the code, and that it would have no effect on behaviour. This is not the case - the common
_seek_checkmethod changes behaviour. If_n_framesis present, andNone, then it doesn't check the upper limit on the frame number, because that would potentially require seeking all the way to the end of the file. Now that there is no_n_frames, it checks the upper limit, and throws anEOFError.I've added a test to ensure that an EOFError is thrown moving forward.
Testing, I find that this resolves the issue. This is also noted in #4518 (comment).