Fix DoS due to lack of eof check
This commit was merged in pull request #287.
This commit is contained in:
@@ -267,8 +267,12 @@ static int cine_read_header(AVFormatContext *avctx)
|
|||||||
|
|
||||||
/* parse image offsets */
|
/* parse image offsets */
|
||||||
avio_seek(pb, offImageOffsets, SEEK_SET);
|
avio_seek(pb, offImageOffsets, SEEK_SET);
|
||||||
for (i = 0; i < st->duration; i++)
|
for (i = 0; i < st->duration; i++) {
|
||||||
|
if (avio_feof(pb))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
av_add_index_entry(st, avio_rl64(pb), i, 0, 0, AVINDEX_KEYFRAME);
|
av_add_index_entry(st, avio_rl64(pb), i, 0, 0, AVINDEX_KEYFRAME);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user