Skip to content

Return error when flushing without pixel format#808

Open
hjanuschka wants to merge 1 commit into
libjxl:mainfrom
hjanuschka:fix/clusterfuzz-526010666
Open

Return error when flushing without pixel format#808
hjanuschka wants to merge 1 commit into
libjxl:mainfrom
hjanuschka:fix/clusterfuzz-526010666

Conversation

@hjanuschka

@hjanuschka hjanuschka commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Chromium's blink_jxl_decoder_fuzzer found that flush_pixels can be reached before the inner decoder has reached the point where the output pixel format is set. That path panicked at pixel_format.unwrap() instead of returning a decoder error.

Return a normal PixelFormatNotSet error instead, which callers can already handle as decode failure. The regression test covers flush_pixels before pixel format setup.

https://issues.chromium.org/issues/526010666

@veluca93

Copy link
Copy Markdown
Member

I'm not sure this is the correct fix - this sounds like an API usage error on the Chrome side.

How hard is it to stop Chrome from calling flush_pixels before pixel format is set? (i.e. before image info is available)

@hjanuschka

Copy link
Copy Markdown
Collaborator Author

https://chromium-review.googlesource.com/c/chromium/src/+/7965920

feel free to close, if having it as a additional defensive guard in the lib or not

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