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

exrdisplay: limit maximum image size based on available screen res #660

Merged
merged 2 commits into from
Feb 10, 2020

Conversation

peterhillman
Copy link
Contributor

As discussed in #610 , exrdisplay doesn't handle large images well. It will always try to match the window resolution to the image size. It doesn't have the ability to resize the window, zoom out, or pan around an image, making it impractical to use with images that are larger than the screen size. Very large images may create windows which are too large for window managers, and exrdisplay will allocate excessive amounts of memory to load them.

This change simply aborts loading early with images that are more than twice as wide or high as the screen.

Signed-off-by: Peter Hillman peterh@wetafx.co.nz

…tion

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.

This seems reasonable to me. As you say, exrdisplay isn't intended as a full-featured image viewer, it primarily functions as example code. This plugs what could be construed as a vulnerability.

@cary-ilm cary-ilm merged commit d06c223 into AcademySoftwareFoundation:master Feb 10, 2020
@peterhillman peterhillman deleted the exrsizelimit branch February 10, 2020 23:28
@cary-ilm cary-ilm added this to the v2.5.0 milestone Apr 26, 2020
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