History

avformat/mxfdec: Check edit_unit for being larger than signed 64bit

Fixes: signed integer overflow: 2 * -4962931467012268000 cannot be represented in type 'long' Fixes: 376496313/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4921469185884160

Michael Niedermayer committed 1 year ago

Commit f7cc0231 parent 4bd9b5f1 file · +2 −0Browse files

Unified · Split

libavformat/mxfdec.c+2−0
@@ -1928,6 +1928,8 @@ static int mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_t · 1927 unmodified lines
19281928 // clamp to actual range of index
19291929 index_end = av_sat_add64(last_segment->index_start_position, last_segment->index_duration);
19301930 edit_unit = FFMAX(FFMIN(edit_unit, index_end), first_segment->index_start_position);
1931+ if (edit_unit < 0)
1932+ return AVERROR_PATCHWELCOME;
19311933
19321934 // guess which table segment this edit unit is in
19331935 // saturation is fine since it's just a guess

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t