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

Corrected negative seeks #4101

Merged
merged 1 commit into from
Sep 30, 2019
Merged

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Sep 30, 2019

In RawDecode.c, throw an error if skip is calculated to be less than zero. It is intended to skip padding between lines, not to go backwards.

Unrelated to that, but with the same idea, in PsdImagePlugin, if the combined sizes of the individual parts is larger than the declared size of the extra data field, then it looks for the next layer by seeking backwards. This is corrected by seeking to (the start of the layer + the size of the extra data field) instead of (the read parts of the layer + the rest of the layer).

@radarhere radarhere merged commit b36c1bc into python-pillow:master Sep 30, 2019
@radarhere radarhere deleted the negative_seek branch September 30, 2019 09:30
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.

None yet

1 participant