Skip to content
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

Do not allow TIFF to seek to a past frame #5473

Merged
merged 1 commit into from
Jun 5, 2021

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented May 7, 2021

Resolves #5472

The issue provides a TIFF image where the seek position of the next frame is the same as the current frame, leading to an infinite loop.

This PR changes the code so that if the next frame has already been processed, it takes that to mean there are no more images.

@radarhere radarhere added the TIFF label May 7, 2021
@radarhere radarhere force-pushed the tiff_seek branch 2 times, most recently from d254ef6 to 80c3020 Compare May 7, 2021 14:14
@radarhere radarhere changed the title Ensure that TIFF can only seek forward for the next frame Fix an infinite loop when checking number of TIFF frames May 7, 2021
@radarhere radarhere changed the title Fix an infinite loop when checking number of TIFF frames Do not allow TIFF to seek to a past frame May 7, 2021
@hugovk hugovk merged commit 1ac7bd9 into python-pillow:master Jun 5, 2021
@radarhere radarhere deleted the tiff_seek branch June 6, 2021 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indefinite loop while counting frames in truncated tiff image
2 participants