]> git.nihav.org Git - nihav.git/commitdiff
avi: handle audio extradata shorter than chunk size
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 16 Jun 2020 13:52:06 +0000 (15:52 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 16 Jun 2020 13:52:06 +0000 (15:52 +0200)
nihav-commonfmt/src/demuxers/avi.rs

index 71cdb01d7d3ef80e781ca7461bb624c35ccd4430..43d154a30b487959f8818d597d09f1059258d245 100644 (file)
@@ -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