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

exrcheck: check for tilesize in reduceMemory mode #920

Merged

Conversation

peterhillman
Copy link
Contributor

Address https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30605

Extend #895 to bypass TiledInputFile and DeepTiledInputFile test on files which contain large tiles. The tests are also bypassed on files where the MultiPartInputFile constructor fails.

Excessively large tiles cause the constructor to allocate large amounts of memory to decode the file. The MultiPartInputFile API constructor does not allocate such memory up-front, so the calling code can check the header attributes to check that tile/scanline sizes are reasonable before calling InputPart or TiledInputPart to allocate memory and read the image.

Header::setMaxImageSize and Header::setMaxTileSize can also be used to abort constructors early before memory is allocated.

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Copy link
Member

@cary-ilm cary-ilm left a comment

Choose a reason for hiding this comment

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

LGTM

@cary-ilm cary-ilm merged commit 50edd2a into AcademySoftwareFoundation:master Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants