From: Kostya Shishkov Date: Fri, 14 Oct 2022 16:23:20 +0000 (+0200) Subject: avi: accept not fully used ODML index chunks X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=bf30ce1bcf061cf59d0dbd149997892ad4fdf7ed;p=nihav.git avi: accept not fully used ODML index chunks --- diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index c4b4817..bc39234 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -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