You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/mov: Check for EOF in mov_read_iloc()
Fixes: Timeout Fixes: 49216/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6563000529584128 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -7555,6 +7555,8 @@ static int mov_read_iloc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||||||
|
|
||||||
for (int i = 0; i < item_count; i++) {
|
for (int i = 0; i < item_count; i++) {
|
||||||
int item_id = (version < 2) ? avio_rb16(pb) : avio_rb32(pb);
|
int item_id = (version < 2) ? avio_rb16(pb) : avio_rb32(pb);
|
||||||
|
if (avio_feof(pb))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
if (version > 0)
|
if (version > 0)
|
||||||
avio_rb16(pb); // construction_method.
|
avio_rb16(pb); // construction_method.
|
||||||
avio_rb16(pb); // data_reference_index.
|
avio_rb16(pb); // data_reference_index.
|
||||||
|
Reference in New Issue
Block a user