changeset 11584:3309ebc37b11 libavcodec

Avoid division by zero Based on clang-scan report http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/107290
author siretart
date Sun, 04 Apr 2010 07:18:10 +0000
parents 0bb7e9003dea
children aea1b01ff81b
files zmbv.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/zmbv.c	Sat Apr 03 15:05:27 2010 +0000
+++ b/zmbv.c	Sun Apr 04 07:18:10 2010 +0000
@@ -434,6 +434,7 @@
         }
         if(c->bw == 0 || c->bh == 0) {
             av_log(avctx, AV_LOG_ERROR, "Unsupported block size %ix%i\n", c->bw, c->bh);
+            return -1;
         }
         if(c->comp != 0 && c->comp != 1) {
             av_log(avctx, AV_LOG_ERROR, "Unsupported compression type %i\n", c->comp);