aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-10-01 00:44:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-11-06 19:49:12 +0100
commit2e1e3c1e41b67b11d06e077255e31886550510c6 (patch)
treee0870adfc704a591b216bae7c8da6023dc538ecf
parent635256a324f4644bbfa2f4332e950a183f82c4c9 (diff)
downloadffmpeg-2e1e3c1e41b67b11d06e077255e31886550510c6.tar.gz
Check for corrupted data in avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 1cce7def0a8eff2e7db294b7d195a0fb1a5043b0) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/avs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avs.c b/libavformat/avs.c
index 1fcb19fdde..878898edbc 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -163,6 +163,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
sub_type = get_byte(s->pb);
type = get_byte(s->pb);
size = get_le16(s->pb);
+ if (size < 4)
+ return AVERROR_INVALIDDATA;
avs->remaining_frame_size -= size;
switch (type) {