indeo5: fix division by 0 in ff_ivi_init_tiles()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 28 Dec 2011 20:31:00 +0000 (21:31 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jan 2012 21:39:40 +0000 (22:39 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 92e2b59dec8c0124a209ce24f23450df9607d9d8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ivi_common.c

index f66053b..e5fdd4a 100644 (file)
@@ -260,6 +260,8 @@ int av_cold ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_hei
             t_width  >>= 1;
             t_height >>= 1;
         }
+        if(t_width<=0 || t_height<=0)
+            return AVERROR(EINVAL);
 
         for (b = 0; b < planes[p].num_bands; b++) {
             band = &planes[p].bands[b];