[FFmpeg-cvslog] indeo4: Fix global array overread.

Michael Niedermayer git at videolan.org
Sat Mar 24 14:58:24 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Mar 24 12:29:05 2012 +0100| [8a20774a24bb1ea68b7360113746eac6e59ad8a8] | committer: Michael Niedermayer

indeo4: Fix global array overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a20774a24bb1ea68b7360113746eac6e59ad8a8
---

 libavcodec/indeo4.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 1d280a0..1265201 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -404,6 +404,10 @@ static int decode_band_hdr(IVI4DecContext *ctx, IVIBandDesc *band,
                 av_log(avctx, AV_LOG_ERROR, "Custom quant matrix encountered!\n");
                 return AVERROR_INVALIDDATA;
             }
+            if (band->quant_mat > 21) {
+                av_log(avctx, AV_LOG_ERROR, "Invalid quant matrix encountered!\n");
+                return AVERROR_INVALIDDATA;
+            }
         }
 
         /* decode block huffman codebook */



More information about the ffmpeg-cvslog mailing list