diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-29 20:49:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-20 23:11:11 +0200 |
commit | 974799368bda4dc95b3c6a265d5285c31cb1d6fe (patch) | |
tree | df6c11e8158df66caf3e08239e5f31da36adccc0 | |
parent | 2ad2da390c4c3770aff0f7617c8c2974c6656072 (diff) | |
download | ffmpeg-974799368bda4dc95b3c6a265d5285c31cb1d6fe.tar.gz |
avformat/rmdec: Check for multiple audio_stream_info
Fixes: memleak
Fixes: 39166/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5153276690038784
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 8fe3566b8fdf4bcf5eed419c1aab6eb848287ff3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/rmdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index a5d03da974..67a68bb2d0 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -128,6 +128,10 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb, uint32_t version; int ret; + // Duplicate tags + if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) + return AVERROR_INVALIDDATA; + /* ra type header */ version = avio_rb16(pb); /* version */ if (version == 3) { |