Fixes: signed integer overflow: 9223372036840103968 + 538976288 cannot be represented in type 'long' Fixes: 70604/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4844090340999168
Unified · Split
| @@ -2393,6 +2393,9 @@ static int mxf_parse_physical_source_package(MXFContext *mxf, MXFTrack *source_t · 2392 unmodified lines | |||
| 2393 | physical_track->edit_rate, | 2393 | physical_track->edit_rate, |
| 2394 | source_track->edit_rate); | 2394 | source_track->edit_rate); |
| 2395 | 2395 | ||
| 2396 | if (av_sat_add64(start_position, mxf_tc->start_frame) != start_position + (uint64_t)mxf_tc->start_frame) | ||
| 2397 | return AVERROR_INVALIDDATA; | ||
| 2398 | |||
| 2396 | if (av_timecode_init(&tc, mxf_tc->rate, flags, start_position + mxf_tc->start_frame, mxf->fc) == 0) { | 2399 | if (av_timecode_init(&tc, mxf_tc->rate, flags, start_position + mxf_tc->start_frame, mxf->fc) == 0) { |
| 2397 | mxf_add_timecode_metadata(&st->metadata, "timecode", &tc); | 2400 | mxf_add_timecode_metadata(&st->metadata, "timecode", &tc); |
| 2398 | return 0; | 2401 | return 0; |