[FFmpeg-cvslog] avsdemux: check for out of bound writes
Laurent Aimar
git at videolan.org
Mon Mar 19 05:30:35 CET 2012
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Fri Sep 30 23:42:31 2011 +0000| [7fa13e12e6eb0c791578e53a32dd6de0de0f8743] | committer: Reinhard Tartler
avsdemux: check for out of bound writes
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
(cherry picked from commit 6de33611c918e6ad5bbc878840a59607cb42b8c0)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7fa13e12e6eb0c791578e53a32dd6de0de0f8743
---
libavformat/avs.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/avs.c b/libavformat/avs.c
index 52294b0..084d461 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -169,6 +169,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
switch (type) {
case AVS_PALETTE:
+ if (size - 4 > sizeof(palette))
+ return AVERROR_INVALIDDATA;
ret = avio_read(s->pb, palette, size - 4);
if (ret < size - 4)
return AVERROR(EIO);
More information about the ffmpeg-cvslog
mailing list