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: assume lots of memory required whenever MultiPart ctor throws #915

Conversation

peterhillman
Copy link
Contributor

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

Example file has a corrupt type attribute, which causes MultiPartInputFile ctor to throw, which bypasses the test for files which would take large amounts of memory during the single part input tests. The RgbaFile API does not throw for this file, but its width causes excessive memory allocation.

This change reverses the sense of the test so every file which causes the MultiPartInputFile API to throw will be assumed to cause large amounts of memory to be used to read the file.

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 5b4337f into AcademySoftwareFoundation:master Feb 6, 2021
@peterhillman peterhillman deleted the exrcheck_safer_reducememory branch February 6, 2021 03:56
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.

2 participants