]> git.nihav.org Git - nihav.git/commitdiff
indeo3: relax size check
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 11 Feb 2026 17:34:54 +0000 (18:34 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 11 Feb 2026 17:34:54 +0000 (18:34 +0100)
borg95.avi (and maybe other Indeo 3.1 videos) declare size to be
16 bits more than real payload size.

nihav-indeo/src/codecs/indeo3.rs

index 8adbc31b99d9a96de7ed8ee1976748cf963ac2d4..21b6a45c9ba110027abc1d94e6148b578a750512 100644 (file)
@@ -916,7 +916,7 @@ impl NADecoder for Indeo3Decoder {
         if (frameno ^ hdr_2 ^ size ^ FRMH_TAG) != check {
             return Err(DecoderError::InvalidData);
         }
-        if i64::from(size) > br.left() {
+        if i64::from(size) > br.left() + 16 {
             return Err(DecoderError::InvalidData);
         }