mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
56434954c4
commit
184322d378
@ -951,6 +951,9 @@ static int mxf_read_index_table_segment(void *arg, AVIOContext *pb, int tag, int
|
|||||||
case 0x3F0B:
|
case 0x3F0B:
|
||||||
segment->index_edit_rate.num = avio_rb32(pb);
|
segment->index_edit_rate.num = avio_rb32(pb);
|
||||||
segment->index_edit_rate.den = 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,
|
av_log(NULL, AV_LOG_TRACE, "IndexEditRate %d/%d\n", segment->index_edit_rate.num,
|
||||||
segment->index_edit_rate.den);
|
segment->index_edit_rate.den);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user