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

Fix bug in TIFF loading of BufferedReader #3998

Merged
merged 4 commits into from Aug 22, 2019

Conversation

chadawagner
Copy link
Contributor

Fixes #3996.

Changes proposed in this pull request:

  • There is an existing fp value that is safely created before the call to Image._getdecoder. The same value should just be used again in the logic surrounding the actual decode.
  • For the case of "we have something else" (no getvalue or fileno) it should seek to the beginning as it does in other cases.

@radarhere radarhere changed the title fix edge case in TIFF loading Fix edge case in TIFF loading Jul 31, 2019
@radarhere
Copy link
Member

Could you add a test that fails without your fix and passes with it?

Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
@radarhere radarhere changed the title Fix edge case in TIFF loading Fix bug in TIFF loading of BufferedReader Aug 22, 2019
@radarhere radarhere merged commit d96f657 into python-pillow:master Aug 22, 2019
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.

BufferedReader wrapping BytesIO breaks tiff loader
2 participants