mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/mxfdec: Check index_edit_rate
Fixes: Assertion b >=0 failed at libavutil/mathematics.c:62
Fixes: 67811/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5108429687422976
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ed49391961
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c657698796
commit
2bcd3136b3
|
@ -938,6 +938,9 @@ static int mxf_read_index_table_segment(void *arg, AVIOContext *pb, int tag, int
|
|||
case 0x3F0B:
|
||||
segment->index_edit_rate.num = avio_rb32(pb);
|
||||
segment->index_edit_rate.den = avio_rb32(pb);
|
||||
if (segment->index_edit_rate.num <= 0 ||
|
||||
segment->index_edit_rate.den <= 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
av_log(NULL, AV_LOG_TRACE, "IndexEditRate %d/%d\n", segment->index_edit_rate.num,
|
||||
segment->index_edit_rate.den);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue