[FFmpeg-cvslog] avcodec/indeo2: check ctab
Michael Niedermayer
git at videolan.org
Mon Sep 5 02:24:47 EEST 2016
ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Fri Aug 19 13:07:14 2016 +0200| [93534cd642ddb92e45226ed9dd059b81a719a6b0] | committer: Michael Niedermayer
avcodec/indeo2: check ctab
Fixes out of array access
Fixes: 6b73fa392ac808f02e95a4e0a5770026/asan_static-oob_1b15f9a_1969_e7778535e5f27225fe0d6ded14721430.AVI
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9ffe44c5c75c485b4cbb12751e228f18da219df3)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93534cd642ddb92e45226ed9dd059b81a719a6b0
---
libavcodec/indeo2.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index 17f2367..7ad686d 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -171,6 +171,12 @@ static int ir2_decode_frame(AVCodecContext *avctx,
ltab = buf[0x22] & 3;
ctab = buf[0x22] >> 2;
+
+ if (ctab > 3) {
+ av_log(avctx, AV_LOG_ERROR, "ctab %d is invalid\n", ctab);
+ return AVERROR_INVALIDDATA;
+ }
+
if (s->decode_delta) { /* intraframe */
if ((ret = ir2_decode_plane(s, avctx->width, avctx->height,
p->data[0], p->linesize[0],
More information about the ffmpeg-cvslog
mailing list