Skip to content

Add missing low clamp when storing negative color values to a unorm8 texture#612

Merged
solidpixel merged 3 commits intomainfrom
fuzz_fix
May 7, 2026
Merged

Add missing low clamp when storing negative color values to a unorm8 texture#612
solidpixel merged 3 commits intomainfrom
fuzz_fix

Conversation

@solidpixel
Copy link
Copy Markdown
Contributor

This change also includes some minor improvements to the OSS-Fuzz build script and associated project-specific usage documentation.

Fixes #611

@solidpixel solidpixel force-pushed the fuzz_fix branch 2 times, most recently from 0be4954 to 500c10e Compare May 7, 2026 09:41
solidpixel added 2 commits May 7, 2026 10:51
Prior to this change decompressing a HDR void-extent block that
contained a negative color would produce a corrupt color output
when stored into a unorm8 output image. Other HDR block types
are unaffected, because they cannot encode negative values.

This changes clamps negative values to zero before storing them
when the output format is unorm8.

Fixes #611.
@solidpixel solidpixel merged commit fb43f0e into main May 7, 2026
9 checks passed
@solidpixel solidpixel deleted the fuzz_fix branch May 7, 2026 09:57
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.

UBSAN failure when storing a negative color channel into a unorm8 texture format

1 participant