From dbf1b2e1895c895da8dc6a0878c1d8a351473162 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 23 May 2020 19:11:23 +0200 Subject: [PATCH] avi: ignore actual bimap header size in relation to stream header size --- nihav-commonfmt/src/demuxers/avi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()?; -- 2.39.5