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 TiffDecode comparison warnings #4756

Merged
merged 1 commit into from Oct 14, 2020
Merged

Conversation

nulano
Copy link
Contributor

@nulano nulano commented Jul 2, 2020

For #4586

Changes proposed in this pull request:

  • rows_per_strip and tile_length are already checked to be less than INT_MAX, so it is safe to cast them to INT32
  • add a check for tile_width to make sure row_byte_size does not overflow and make it safe to cast to INT32
  • x, y, tile_y, and strip_row are compared with signed ints or the values above only, it is safe to change their type to INT32

Before: https://travis-ci.org/github/python-pillow/Pillow/jobs/704275379#L2399-L2419
After: https://travis-ci.org/github/nulano/Pillow/jobs/704337888#L2314

@radarhere radarhere mentioned this pull request Jul 3, 2020
@radarhere

This comment has been minimized.

@nulano

This comment has been minimized.

@hugovk hugovk merged commit e58baa0 into python-pillow:master Oct 14, 2020
@nulano nulano deleted the warn-tiff branch October 14, 2020 19:01
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

3 participants