History

avformat/mxfdec: More offset_temp checks

Fixes: signed integer overflow: 9223372036854775807 - -1927491430256034080 cannot be represented in type 'long' Fixes: 70607/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5282235077951488

Michael Niedermayer committed 2 years ago

Commit 5a96aa41 parent 176db9d1 file · +5 −0Browse files

Unified · Split

libavformat/mxfdec.c+5−0
@@ -1921,6 +1921,11 @@ static int mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_t · 1920 unmodified lines
1921 return mxf_absolute_bodysid_offset(mxf, index_table->body_sid, offset_temp, offset_out, partition_out);1921 return mxf_absolute_bodysid_offset(mxf, index_table->body_sid, offset_temp, offset_out, partition_out);
1922 } else {1922 } else {
1923 /* EditUnitByteCount == 0 for VBR indexes, which is fine since they use explicit StreamOffsets */1923 /* EditUnitByteCount == 0 for VBR indexes, which is fine since they use explicit StreamOffsets */
1924 if (s->edit_unit_byte_count && (s->index_duration > INT64_MAX / s->edit_unit_byte_count ||
1925 s->edit_unit_byte_count * s->index_duration > INT64_MAX - offset_temp)
1926 )
1927 return AVERROR_INVALIDDATA;
1928
1924 offset_temp += s->edit_unit_byte_count * s->index_duration;1929 offset_temp += s->edit_unit_byte_count * s->index_duration;
1925 }1930 }
1926 }1931 }

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