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

Fix error checking for file descriptor in gifinput on windows #2886

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

SRHMorris
Copy link
Contributor

Description

Calling ImageInput::open() with a file path that doesn't exist will cause OIIO to attempt to load the missing file with all plugins. When it gets to the gif plugin the file descriptor is not checked correctly (windows only). This causes an assert inside DGifOpenFileHandle() when it calls _setmode().

Tests

Checklist:

  • I have read the contribution guidelines.
  • If this is more extensive than a small change to existing code, I
    have previously submitted a Contributor License Agreement
    (individual, and if there is any way my
    employers might think my programming belongs to them, then also
    corporate).
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

Good catch!

@lgritz lgritz merged commit 9a3743a into AcademySoftwareFoundation:master Mar 5, 2021
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

2 participants