fix: prevent shift overflow panic in ColorMap size validation

`1usize << bits_per_sample` panics when bits_per_sample >= 64.
Use checked_shl to return a LimitsExceeded error instead.

Found by fuzzing decode_comprehensive with a BE TIFF containing
PhotometricInterpretation=RGBPalette and BitsPerSample=83.
This commit is contained in:
Lilith River committed 2026-04-09 04:46:05 -06:00
1 parent b0712855b1
commit 26b18c5184
2 files changed
+3 -2

No files matched your search