From: Kostya Shishkov Date: Tue, 16 Jun 2020 13:52:06 +0000 (+0200) Subject: avi: handle audio extradata shorter than chunk size X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=c7a1307604dd07413141fdc71529f3606622ac93;p=nihav.git avi: handle audio extradata shorter than chunk size --- diff --git a/nihav-commonfmt/src/demuxers/avi.rs b/nihav-commonfmt/src/demuxers/avi.rs index 71cdb01..43d154a 100644 --- a/nihav-commonfmt/src/demuxers/avi.rs +++ b/nihav-commonfmt/src/demuxers/avi.rs @@ -457,7 +457,7 @@ fn parse_strf_auds(dmx: &mut AVIDemuxer, strmgr: &mut StreamManager, size: usize let ahdr = NAAudioInfo::new(samplespersec, channels as u8, soniton, block_align as usize); let edata = if size > 16 { let edata_size = dmx.src.read_u16le()? as usize; - validate!(edata_size + 18 == size); + validate!(edata_size + 18 <= size); dmx.read_extradata(size - 18)? } else { None