aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-12-05 22:19:05 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2022-01-13 22:44:11 +0100
commit19a307f68d005d62dbac9dc75474a633bd95f03e (patch)
treec53eb4f46b10ce43099e460466de6ceea1eda073 /libavformat
parent5e8556dd369dc4d4e0cb7c886aca2762c8f28db5 (diff)
downloadffmpeg-19a307f68d005d62dbac9dc75474a633bd95f03e.tar.gz
avformat/mxfdec: Check for duplicate mxf_read_index_entry_array()
Fixes: memleak Fixes: 41596/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6439060204290048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 4f44a218e53cd92e64ba10a935bc1e7583c3e218) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 2f44c5ae08..2d06ace14a 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -900,6 +900,9 @@ static int mxf_read_index_entry_array(AVIOContext *pb, MXFIndexTableSegment *seg
{
int i, length;
+ if (segment->temporal_offset_entries)
+ return AVERROR_INVALIDDATA;
+
segment->nb_index_entries = avio_rb32(pb);
length = avio_rb32(pb);