summaryrefslogtreecommitdiff
path: root/libavcodec/ivi_common.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-28 21:31:00 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-28 21:31:00 +0100
commit92e2b59dec8c0124a209ce24f23450df9607d9d8 (patch)
tree021c6d4919686ca46e014f3744e35d3dcdc19486 /libavcodec/ivi_common.c
parenta1ca45317df0993e98b4e3aec9ebdae64449478b (diff)
indeo5: fix division by 0 in ff_ivi_init_tiles()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ivi_common.c')
-rw-r--r--libavcodec/ivi_common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 3ccef2867c..f917b3a826 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];