Skip to content

Fix subsampled decode panic with nonzero image origins - #117

Merged
jcwal1516 merged 2 commits into
mainfrom
fix/subsampled-component-origin
Sep 27, 2026
Merged

jcwal1516 merged 2 commits into
mainfrom
fix/subsampled-component-origin

Conversation

@jcwal1516

Copy link
Copy Markdown
Member

A 166-byte input found by wsi-rs fuzzing panics in j2k-native 0.11.1 when a subsampled component has a nonzero image origin. The store path subtracts the full component origin from reduced-resolution coordinates. Index reconstructed coefficients relative to their own grid and intersect the copied region with that grid in floating-point and integer storage.

The retained reproducer checks full and cropped decoding at reductions 0, 1, and 2 against the full decoded pixels. It failed with subtraction overflow before the fix; all 25 component-plane tests now pass. Library Clippy and targeted test Clippy pass with the repository's existing test-only allocation lint policy.

Stacked on #116; required for the wsi-rs dependency upgrade.

@jcwal1516
jcwal1516 changed the base branch from perf/codec-batching-and-metal-kernels to main September 27, 2026 00:58
@jcwal1516
jcwal1516 merged commit b5a68ce into main Sep 27, 2026
22 of 24 checks passed
@jcwal1516
jcwal1516 deleted the fix/subsampled-component-origin branch September 28, 2026 06:05
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.

1 participant