avi: accept not fully used ODML index chunks
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 14 Oct 2022 16:23:20 +0000 (18:23 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 14 Oct 2022 16:23:20 +0000 (18:23 +0200)
nihav-commonfmt/src/demuxers/avi.rs

index c4b4817c633b335e62b01b739f3668da4ba7b8c2..bc3923444c6e96bffff3afd5a1cacf4ca49447b0 100644 (file)
@@ -819,7 +819,7 @@ fn parse_odml_ix(src: &mut ByteReader, strmgr: &mut StreamManager, seek_idx: &mu
     let idx_type = src.read_byte()?;
     validate!(sub_type == 0 && idx_type == 1);
     let entries = src.read_u32le()? as usize;
-    validate!(size == 24 + entries * 4 * entry_size);
+    validate!(size >= 24 + entries * 4 * entry_size);
     src.read_tag()?; //chunk id
     let base_offset = src.read_u64le()?;
     src.read_u32le()?; //reserved