diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-12-26 11:50:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-02-02 14:18:21 +0100 |
commit | c4da89d96226b2caaab3948a268261b1ec3bac7f (patch) | |
tree | 4c10ffa748811adf30ecf81856de6b2938b99e35 /libavformat/vividas.c | |
parent | 67e2eab73e441f95578532f30d6b430497710417 (diff) | |
download | ffmpeg-c4da89d96226b2caaab3948a268261b1ec3bac7f.tar.gz |
avformat/vividas: Check number of audio channels
Fixes: division by 0
Fixes: 28597/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5752201490333696
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 66deab3a2609aa9462709c82be5d4efbb6af2a08)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/vividas.c')
-rw-r--r-- | libavformat/vividas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/vividas.c b/libavformat/vividas.c index fb872767e8..12554f46cd 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -373,7 +373,7 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t * avio_rl16(pb); //codec_subid st->codecpar->channels = avio_rl16(pb); // channels st->codecpar->sample_rate = avio_rl32(pb); // sample_rate - if (st->codecpar->sample_rate <= 0) + if (st->codecpar->sample_rate <= 0 || st->codecpar->channels <= 0) return AVERROR_INVALIDDATA; avio_seek(pb, 10, SEEK_CUR); // data_1 q = avio_r8(pb); |