[FFmpeg-cvslog] r22795 - trunk/libavcodec/zmbv.c

siretart subversion
Sun Apr 4 09:18:10 CEST 2010


Author: siretart
Date: Sun Apr  4 09:18:10 2010
New Revision: 22795

Log:
Avoid division by zero

Based on clang-scan report http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/107290

Modified:
   trunk/libavcodec/zmbv.c

Modified: trunk/libavcodec/zmbv.c
==============================================================================
--- trunk/libavcodec/zmbv.c	Sat Apr  3 17:29:48 2010	(r22794)
+++ trunk/libavcodec/zmbv.c	Sun Apr  4 09:18:10 2010	(r22795)
@@ -434,6 +434,7 @@ static int decode_frame(AVCodecContext *
         }
         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);



More information about the ffmpeg-cvslog mailing list