[FFmpeg-cvslog] Check for corrupted data in avs demuxer.
Laurent Aimar
git at videolan.org
Sat Oct 1 02:42:31 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Oct 1 00:44:54 2011 +0200| [1cce7def0a8eff2e7db294b7d195a0fb1a5043b0] | committer: Michael Niedermayer
Check for corrupted data in avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1cce7def0a8eff2e7db294b7d195a0fb1a5043b0
---
libavformat/avs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/avs.c b/libavformat/avs.c
index 89b2642..7b90f85 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