diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-29 20:49:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-16 21:19:24 +0200 |
commit | 770b4de8d14700490ef7c52f14492ad9d13bb2b6 (patch) | |
tree | da2a22974c88f52f54c20b1b32d42ee39d77d1d2 /libavformat | |
parent | 3c81d7025e9b6282b3e843b3eb9a4d71466d9f95 (diff) | |
download | ffmpeg-770b4de8d14700490ef7c52f14492ad9d13bb2b6.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>
Diffstat (limited to 'libavformat')
-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 8f31c4717c..f435ba0f83 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -127,6 +127,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) { |