diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-06-16 15:52:06 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-06-16 15:52:06 +0200 |
commit | c7a1307604dd07413141fdc71529f3606622ac93 (patch) | |
tree | b0c5d465466a8be3fc71e06776ac393c08485c57 | |
parent | 61cab15b810434b8e62234ab5cdfcb17ec2d566d (diff) | |
download | nihav-c7a1307604dd07413141fdc71529f3606622ac93.tar.gz |
avi: handle audio extradata shorter than chunk size
-rw-r--r-- | nihav-commonfmt/src/demuxers/avi.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |