diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-29 23:13:35 +0000 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-10-07 16:25:31 +0200 |
commit | e3ca9b93d9f464861638dda3280fcf65e402466a (patch) | |
tree | 997a8db6f32bf4ad9957964a9d3deab573cdd04b | |
parent | 210c80331e0604edf9c800865c26ba06ed3c2082 (diff) | |
download | ffmpeg-e3ca9b93d9f464861638dda3280fcf65e402466a.tar.gz |
dsicinav: Check for out of bounds reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
-rw-r--r-- | libavcodec/dsicinav.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c index 0e0d73b68d..5fe99ba26c 100644 --- a/libavcodec/dsicinav.c +++ b/libavcodec/dsicinav.c @@ -216,6 +216,8 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, bitmap_frame_size = buf_size - 4; /* handle palette */ + if (bitmap_frame_size < palette_colors_count * (3 + (palette_type != 0))) + return AVERROR_INVALIDDATA; if (palette_type == 0) { for (i = 0; i < palette_colors_count; ++i) { cin->palette[i] = bytestream_get_le24(&buf); |