aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/indeo4.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-24 12:29:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-24 14:54:11 +0100
commit8a20774a24bb1ea68b7360113746eac6e59ad8a8 (patch)
treeebfb3adb5ea31e9117530bc0e44f5f7ae6199894 /libavcodec/indeo4.c
parent5cddfc58d882192d98da1520fdafc4869a3e8099 (diff)
downloadffmpeg-8a20774a24bb1ea68b7360113746eac6e59ad8a8.tar.gz
indeo4: Fix global array overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r--libavcodec/indeo4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 1d280a0c53..1265201541 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 */