aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-30 23:42:31 +0000
committerJanne Grunau <janne-libav@jannau.net>2011-10-10 21:27:04 +0200
commit76c6971a6464705f263fc30e537b370a3a7c853b (patch)
treed4615241388984e46b0b319accd7c43d4252b83c /libavformat
parent7bb1807c2dd9623842f1c6d454e7f2892b5bc8d7 (diff)
downloadffmpeg-76c6971a6464705f263fc30e537b370a3a7c853b.tar.gz
avsdemux: check for corrupted data
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avs.c b/libavformat/avs.c
index bf3d4f95bb..1c699fbf3c 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) {