[FFmpeg-cvslog] avformat/rmdec: Check for multiple audio_stream_info

Michael Niedermayer git at videolan.org
Sat Oct 9 19:37:32 EEST 2021


ffmpeg | branch: release/3.4 | Michael Niedermayer <michael at niedermayer.cc> | Wed Sep 29 20:49:27 2021 +0200| [a85739087d6c3e0b849824f8603bef6961ffe51a] | committer: Michael Niedermayer

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 at niedermayer.cc>
(cherry picked from commit 8fe3566b8fdf4bcf5eed419c1aab6eb848287ff3)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a85739087d6c3e0b849824f8603bef6961ffe51a
---

 libavformat/rmdec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 0135f935af..031590b109 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -131,6 +131,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) {



More information about the ffmpeg-cvslog mailing list