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

Argument to isValidCompression should be int rather than Compression #1661

Merged

Conversation

cary-ilm
Copy link
Member

@cary-ilm cary-ilm commented Mar 6, 2024

The sanitizer flags invalid enum values. By definition, the argument might not be a valid enum value.

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

The sanitizer flags invalid enum values. By definition, the argument
might not be a valid enum value.

Signed-off-by: Cary Phillips <cary@ilm.com>
Copy link
Contributor

@peterhillman peterhillman left a comment

Choose a reason for hiding this comment

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

LGTM
ImfHeader.cpp uses isValidCompression, so there's an implicit cast from Compression to int there. Is that OK or should it be a static_cast?

@cary-ilm
Copy link
Member Author

cary-ilm commented Mar 6, 2024

I think that conversion from Compression to int is fine without the cast. If anyone reports a warning, we should provide a isValidCompression(Compression) function.

@cary-ilm cary-ilm merged commit c27ea89 into AcademySoftwareFoundation:main Mar 6, 2024
28 checks passed
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.

2 participants