aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/indeo5.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-15 21:01:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-15 21:02:01 +0200
commit88a97d660d65b8d5ac2ca719969c0096ace00114 (patch)
tree7f3d9062d286d568f7dcd2579f15913f3d2360f7 /libavcodec/indeo5.c
parentfefc65675eb5def2a34787cffea53c88e956cca1 (diff)
downloadffmpeg-88a97d660d65b8d5ac2ca719969c0096ace00114.tar.gz
indeo5: check for unsupported luma block type
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/indeo5.c')
-rw-r--r--libavcodec/indeo5.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index d0aea84f5a..b35486b106 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -167,6 +167,11 @@ static int decode_gop_header(IVI5DecContext *ctx, AVCodecContext *avctx)
blk_size = 8 >> get_bits1(&ctx->gb);
mb_size = blk_size << !mb_size;
+ if (p==0 && blk_size==4) {
+ av_log(avctx, AV_LOG_ERROR, "4x4 luma blocks are unsupported!\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
blk_size_changed = mb_size != band->mb_size || blk_size != band->blk_size;
if (blk_size_changed) {
band->mb_size = mb_size;