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

Address #270: limit Tiled images to INT_MAX total number of tiles #423

Merged
merged 2 commits into from
Jul 10, 2019

Conversation

peterhillman
Copy link
Contributor

If Multipart API was used, or a file has multiple parts and the TiledInputFile API is used, there's an implicit maximum tile count of INT_MAX. This change enforces that limit on reading and writing all tiled images.
INT_MAX tiles is normally not exceeded unless very large images are written with very small tiles.

OpenEXR/IlmImf/ImfTiledMisc.cpp Outdated Show resolved Hide resolved
OpenEXR/IlmImf/ImfTiledMisc.cpp Outdated Show resolved Hide resolved
@peterhillman
Copy link
Contributor Author

Issue #265 (arithmetic overflow before excessive memory allocation occurs) is a similar problem to issue #270 and fixed by this PR, as is #264: the new check throws an exception before the overflow occurs

Copy link
Contributor

@meshula meshula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@peterhillman peterhillman merged commit eda733c into AcademySoftwareFoundation:master Jul 10, 2019
@cary-ilm cary-ilm added this to the v2.4.0 milestone Aug 10, 2019
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