aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-12-05 22:19:05 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-12-09 13:40:54 +0100
commit4f44a218e53cd92e64ba10a935bc1e7583c3e218 (patch)
tree5d7bceeeba7f0928fda40dc4c6c26234e12c4b87
parent0ec75723a484405eb2f2ec2f9e58161b168ed8b0 (diff)
downloadffmpeg-4f44a218e53cd92e64ba10a935bc1e7583c3e218.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>
-rw-r--r--libavformat/mxfdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index c231c944c0..1d50198279 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1111,6 +1111,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);