indeo: Do not reference mismatched tiles
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 14 Jul 2013 14:49:43 +0000 (16:49 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 15 Jul 2013 09:46:30 +0000 (11:46 +0200)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
libavcodec/ivi_common.c

index 6436cd3..de9ad55 100644 (file)
@@ -343,6 +343,8 @@ static int ivi_init_tiles(IVIBandDesc *band, IVITile *ref_tile,
 
             tile->ref_mbs = 0;
             if (p || b) {
+                if (tile->num_MBs != ref_tile->num_MBs)
+                    return AVERROR_INVALIDDATA;
                 tile->ref_mbs = ref_tile->mbs;
                 ref_tile++;
             }