History

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

Fixes: loop.mv

Michael Niedermayer committed 9 years ago

Commit 4f05e2e1 parent 96f24d11 file · +2 −0Browse files

Unified · Split

libavformat/mvdec.c+2−0
@@ -342,6 +342,8 @@ static int mv_read_header(AVFormatContext *avctx) · 341 unmodified lines
342 uint32_t pos = avio_rb32(pb);342 uint32_t pos = avio_rb32(pb);
343 uint32_t asize = avio_rb32(pb);343 uint32_t asize = avio_rb32(pb);
344 uint32_t vsize = avio_rb32(pb);344 uint32_t vsize = avio_rb32(pb);
345 if (avio_feof(pb))
346 return AVERROR_INVALIDDATA;
345 avio_skip(pb, 8);347 avio_skip(pb, 8);
346 av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME);348 av_add_index_entry(ast, pos, timestamp, asize, 0, AVINDEX_KEYFRAME);
347 av_add_index_entry(vst, pos + asize, i, vsize, 0, AVINDEX_KEYFRAME);349 av_add_index_entry(vst, pos + asize, i, vsize, 0, AVINDEX_KEYFRAME);

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