diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-01 00:44:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-01 02:41:39 +0200 |
commit | 1cce7def0a8eff2e7db294b7d195a0fb1a5043b0 (patch) | |
tree | a1b736a274ed338c6807418ca72fd561c64b8b80 /libavformat | |
parent | 834b3760a7ca112573e813bd6c3573a8c0daf4ed (diff) | |
download | ffmpeg-1cce7def0a8eff2e7db294b7d195a0fb1a5043b0.tar.gz |
Check for corrupted data in avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avs.c b/libavformat/avs.c index 89b2642c36..7b90f85153 100644 --- a/libavformat/avs.c +++ b/libavformat/avs.c @@ -163,6 +163,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) sub_type = avio_r8(s->pb); type = avio_r8(s->pb); size = avio_rl16(s->pb); + if (size < 4) + return AVERROR_INVALIDDATA; avs->remaining_frame_size -= size; switch (type) { |