Skip to content

Fix TIFF color map index bounds#573

Merged
treeform merged 1 commit intomasterfrom
fix/tiff-colormap-index-bounds
Apr 30, 2026
Merged

Fix TIFF color map index bounds#573
treeform merged 1 commit intomasterfrom
fix/tiff-colormap-index-bounds

Conversation

@treeform
Copy link
Copy Markdown
Owner

Fixes #562.

Summary:

  • Reject TIFF color map indexes equal to colorMap.len before indexing the palette.
  • Add a regression test with a crafted one-pixel palette TIFF whose pixel value is one past the valid palette range.

Tests:

  • nim r --hints:off --warnings:off tests\test_tiff.nim
  • git diff --check

@treeform treeform merged commit 102464c into master Apr 30, 2026
3 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.

Off-by-one crash in TIFF parsing

1 participant