summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-29 20:49:27 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 11:42:16 +0200
commit8fe3566b8fdf4bcf5eed419c1aab6eb848287ff3 (patch)
tree6f9272987aa70b5c6cc7e6f0ad3a00d3d3ec0b5c /libavformat/rmdec.c
parentf054871a650f0505bfecf7819f79882067febc12 (diff)
downloadffmpeg-8fe3566b8fdf4bcf5eed419c1aab6eb848287ff3.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>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index d4ba6622a6..3a3f6aaf09 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) {