From acdc505b2aeeeed72bf9f7373a5991861afb5752 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 28 Dec 2011 21:31:00 +0100 Subject: [PATCH] indeo5: fix division by 0 in ff_ivi_init_tiles() Signed-off-by: Michael Niedermayer (cherry picked from commit 92e2b59dec8c0124a209ce24f23450df9607d9d8) Signed-off-by: Michael Niedermayer --- libavcodec/ivi_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c index f66053b1a3..e5fdd4a95b 100644 --- a/libavcodec/ivi_common.c +++ b/libavcodec/ivi_common.c @@ -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];