diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-01 00:44:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-06 19:49:12 +0100 |
commit | 62da9203fd0c26e075c59eb6a82006de22fdbdc1 (patch) | |
tree | 6d4dd318bf292cde72ba31a74a97a42246fb8f53 | |
parent | 2e1e3c1e41b67b11d06e077255e31886550510c6 (diff) | |
download | ffmpeg-62da9203fd0c26e075c59eb6a82006de22fdbdc1.tar.gz |
Check for out of bound writes in the avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5d44c061cf511d97be5fac8d76be2f3915c6e798)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/avs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avs.c b/libavformat/avs.c index 878898edbc..eda7f9d2f7 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 = get_buffer(s->pb, palette, size - 4); if (ret < size - 4) return AVERROR(EIO); |