From 5bec8a5a27aae8cba8795f7056c3a0947747488f Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 7 Oct 2026 12:17:50 +0200 Subject: [PATCH] nihav_codec_support/msstructs: ignore bitplanes for large enough bitdepth during valdation --- nihav-codec-support/src/codecs/msstructs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-codec-support/src/codecs/msstructs.rs b/nihav-codec-support/src/codecs/msstructs.rs index e714083..a3f4db3 100644 --- a/nihav-codec-support/src/codecs/msstructs.rs +++ b/nihav-codec-support/src/codecs/msstructs.rs @@ -50,7 +50,7 @@ impl MSBitmapInfo { return Err("height"); } if !KNOWN_BAD_FORMATS.contains(&&self.compression) { - if self.planes == 0 || self.planes > self.bitcount { + if (self.planes == 0 && self.bitcount <= 8) || self.planes > self.bitcount { return Err("planes"); } if !(1..=32).contains(&self.bitcount) { -- 2.39.5