From: Kostya Shishkov Date: Fri, 4 Dec 2026 10:37:51 +0000 (+0100) Subject: gif: accept files with last pixel not being encoded X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=330f52404bdf2deb9107643bdf778e356d80c101;p=nihav.git gif: accept files with last pixel not being encoded --- 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(()) }