From 330f52404bdf2deb9107643bdf778e356d80c101 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 4 Dec 2026 11:37:51 +0100 Subject: [PATCH] gif: accept files with last pixel not being encoded --- nihav-commonfmt/src/codecs/gif.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-commonfmt/src/codecs/gif.rs b/nihav-commonfmt/src/codecs/gif.rs index 443f922..7e939cb 100644 --- a/nihav-commonfmt/src/codecs/gif.rs +++ b/nihav-commonfmt/src/codecs/gif.rs @@ -159,7 +159,7 @@ impl LZWState { self.idx_bits += 1; } } - validate!(pos == dst.len()); + validate!(pos == dst.len() || pos + 1 == dst.len()); validate!(br.pos + 2 == src.len()); Ok(()) } -- 2.47.3