indeo5: check for unsupported luma block type
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 15 Apr 2012 19:01:35 +0000 (21:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 15 Apr 2012 19:02:01 +0000 (21:02 +0200)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/indeo5.c

index d0aea84..b35486b 100644 (file)
@@ -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;