diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-02 00:58:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-09 13:53:29 +0200 |
commit | a39c4ce6b15f8f7f1dcc1ab242c11a4f78be858e (patch) | |
tree | 7b19f43a3454492e56421c71d22f107970d5e5be /libavformat/iff.c | |
parent | 567c02a19aee51158702d6647615dab421b0c1fa (diff) | |
download | ffmpeg-a39c4ce6b15f8f7f1dcc1ab242c11a4f78be858e.tar.gz |
avformat/iff: Check block align also for ID_MAUD
Fixes: Timeout & OOM
Fixes: 28701/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5185094964871168
Fixes: 29116/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4874284795297792
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 b17ffe8f8f30ba03901bcf7caa6c523e874e8fde)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/iff.c')
-rw-r--r-- | libavformat/iff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c index 45dbdc4d88..05e79ace75 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -760,7 +760,7 @@ static int iff_read_header(AVFormatContext *s) st->codecpar->bits_per_coded_sample = av_get_bits_per_sample(st->codecpar->codec_id); st->codecpar->bit_rate = (int64_t)st->codecpar->channels * st->codecpar->sample_rate * st->codecpar->bits_per_coded_sample; st->codecpar->block_align = st->codecpar->channels * st->codecpar->bits_per_coded_sample; - if (st->codecpar->codec_tag == ID_DSD && st->codecpar->block_align <= 0) + if ((st->codecpar->codec_tag == ID_DSD || st->codecpar->codec_tag == ID_MAUD) && st->codecpar->block_align <= 0) return AVERROR_INVALIDDATA; break; |