[FFmpeg-devel] [PATCH] avoid division by zero in libavcodec/zmbv.c

Reinhard Tartler siretart
Sat Apr 3 13:53:17 CEST 2010


Based on report from: <http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/107290>
Fixes: http://tranquillity.ath.cx/clang/2010-04-02-1/report-o70wDv.html#EndPath

--- libavcodec/zmbv.c	(revision 22580)
+++ libavcodec/zmbv.c	(working copy)
@@ -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);

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4




More information about the ffmpeg-devel mailing list