From: Kostya Shishkov Date: Sat, 23 May 2020 17:11:23 +0000 (+0200) Subject: avi: ignore actual bimap header size in relation to stream header size X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=dbf1b2e1895c895da8dc6a0878c1d8a351473162;hp=045d52bd013b3b56b5ad79c6333da9f8f7bfd3d1;p=nihav.git avi: ignore actual bimap header size in relation to stream header size --- diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index ed4edd4..f108e3c 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -393,7 +393,7 @@ fn parse_strf(dmx: &mut AVIDemuxer, strmgr: &mut StreamManager, size: usize) -> fn parse_strf_vids(dmx: &mut AVIDemuxer, strmgr: &mut StreamManager, size: usize) -> DemuxerResult { if size < 40 { return Err(InvalidData); } let bi_size = dmx.src.read_u32le()?; - if (bi_size as usize) > size { return Err(InvalidData); } + if (bi_size as usize) < 40 { return Err(InvalidData); } let width = dmx.src.read_u32le()?; let height = dmx.src.read_u32le()? as i32; let planes = dmx.src.read_u16le()?;