History

avformat/mxfdec: check number of index table entires more strictly

Let's ignore the index table if the number of index entries does not match the index duration (or the special AVID index entry counts). Fixes: OOM Fixes: 50551/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6607795234930688

Marton Balint committed 3 years ago

Commit af606c21 parent 41dfa621 file · +8 −0Browse files

Unified · Split

libavformat/mxfdec.c+8−0
@@ -1937,6 +1937,14 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta · 1936 unmodified lines
1937 return 0;1937 return 0;
1938 }1938 }
1939 1939
1940 if (s->nb_index_entries != s->index_duration &&
1941 s->nb_index_entries != s->index_duration + 1 && /* Avid index */
1942 s->nb_index_entries != s->index_duration * 2 + 1) {
1943 index_table->nb_ptses = 0;
1944 av_log(mxf->fc, AV_LOG_ERROR, "ignoring IndexSID %d, duration does not match nb_index_entries\n", s->index_sid);
1945 return 0;
1946 }
1947
1940 index_table->nb_ptses += s->index_duration;1948 index_table->nb_ptses += s->index_duration;
1941 }1949 }
1942 1950

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