aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2020-06-16 15:52:06 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2020-06-16 15:52:06 +0200
commitc7a1307604dd07413141fdc71529f3606622ac93 (patch)
treeb0c5d465466a8be3fc71e06776ac393c08485c57
parent61cab15b810434b8e62234ab5cdfcb17ec2d566d (diff)
downloadnihav-c7a1307604dd07413141fdc71529f3606622ac93.tar.gz
avi: handle audio extradata shorter than chunk size
-rw-r--r--nihav-commonfmt/src/demuxers/avi.rs2
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