Browse files

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


Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <>
  • Loading branch information...
Michael Niedermayer
Michael Niedermayer committed Aug 24, 2017
1 parent 96f24d1 commit 4f05e2e2dc1a89f38cd9f0960a6561083d714f1e
Showing with 2 additions and 0 deletions.
  1. +2 −0 libavformat/mvdec.c
@@ -342,6 +342,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);

1 comment on commit 4f05e2e


This comment has been minimized.

Show comment
Hide comment

shqking commented on 4f05e2e Sep 1, 2017

Please sign in to comment.