diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-12-05 22:19:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-04-13 23:39:50 +0200 |
commit | 816a97ba507a92c507f6583859b7f91c63da8a91 (patch) | |
tree | bda55501e3e5955ac5df1235f47421af71d6aa1a /libavformat | |
parent | 7300c29bd4c61b7e12b0e68b1d0fb6ae14a81bbe (diff) | |
download | ffmpeg-816a97ba507a92c507f6583859b7f91c63da8a91.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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 8275add38e..06a7af425c 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); |