Commit 28c08ab9 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mvdec: Fix DoS due to lack of eof check


Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: 's avatarMichael Niedermayer <>
(cherry picked from commit 4f05e2e2)
Signed-off-by: 's avatarMichael Niedermayer <>
parent 953c6259
......@@ -338,6 +338,8 @@ static int mv_read_header(AVFormatContext *avctx)
uint32_t pos = avio_rb32(pb);
uint32_t asize = avio_rb32(pb);
uint32_t vsize = avio_rb32(pb);
if (avio_feof(pb))
avio_skip(pb, 8);
av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME);
av_add_index_entry(vst, pos + asize, i, vsize, 0, AVINDEX_KEYFRAME);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment