diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-10-01 00:44:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-01 02:41:39 +0200 |
commit | 5d44c061cf511d97be5fac8d76be2f3915c6e798 (patch) | |
tree | 2663bb6b15828510a1222bd426dbc1ab692e3ca3 /libavformat/avs.c | |
parent | 1cce7def0a8eff2e7db294b7d195a0fb1a5043b0 (diff) | |
download | ffmpeg-5d44c061cf511d97be5fac8d76be2f3915c6e798.tar.gz |
Check for out of bound writes in the avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avs.c')
-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 7b90f85153..ad5ac05988 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); |