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

prevent integer overflow in DeepScanlineInputFile with huge images #1261

Merged

Conversation

peterhillman
Copy link
Contributor

Address an overflow allocating sample count table in DeepScanLineInputFile (issue found by Nick C)

When there are more than 2^29 pixels in an image, the table allocation overflows, causing incorrect memory allocation of the table. Switching storage from Array to std::vector would allow for larger images, but the limit seems a reasonable one, so instead an explicit check for overflow is added. Larger images should still be readable using the core API (or, better still, written using the deeptile API)

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 a03aca3 into AcademySoftwareFoundation:main Jun 2, 2022
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Mar 3, 2023
cary-ilm pushed a commit that referenced this pull request Mar 5, 2023
@cary-ilm cary-ilm added the v3.1.6 label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants