-
Notifications
You must be signed in to change notification settings - Fork 566
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 #3950: Div by 0 during DXT4 DDS load #3959
Conversation
Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
There's a secondary failure after the initial one hit in the report. I'll need a bit more time to test out the fix. The failure is that the file declares itself as a DXT4, which has alpha (4 channel), but it also has its "normal map" flag set. This confuses the code inside |
Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
Is this ready to review, @jessey-git ? |
Yes, I believe so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #3950 |
…n#3959) Fixes AcademySoftwareFoundation#3950 Fix the div-by-0 when handling unassociated alpha during a DXT4 DDS load. The code mirrors what other formats do by first checking to see if the alpha value is not 0 before continuing. Added the 218-byte file from the bug to the local test suite. --------- Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
Description
Fix the div-by-0 when handling unassociated alpha during a DXT4 DDS load. The code mirrors what other formats do by first checking to see if the alpha value is not 0 before continuing.
Tests
Added the 218-byte file from the bug to the local test suite.
Checklist:
(adding new test cases if necessary).
corresponding Python bindings (and if altering ImageBufAlgo functions, also
exposed the new functionality as oiiotool options).
already run clang-format before submitting, I definitely will look at the CI
test that runs clang-format and fix anything that it highlights as being
nonconforming.