[FFmpeg-cvslog] avsdemux: check for corrupted data

Laurent Aimar git at videolan.org
Tue Oct 11 03:52:34 CEST 2011


ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Sep 30 23:42:31 2011 +0000| [76c6971a6464705f263fc30e537b370a3a7c853b] | committer: Janne Grunau

avsdemux: check for corrupted data

Signed-off-by: Janne Grunau <janne-libav at jannau.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=76c6971a6464705f263fc30e537b370a3a7c853b
---

 libavformat/avs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/avs.c b/libavformat/avs.c
index bf3d4f9..1c699fb 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) {



More information about the ffmpeg-cvslog mailing list