[FFmpeg-cvslog] rv10: always check image size not just in some cases.

Michael Niedermayer git at videolan.org
Thu Nov 15 03:45:15 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Nov 15 02:16:56 2012 +0100| [caa2fa2c69e760b3dad6358178ccbad39ba8a268] | committer: Michael Niedermayer

rv10: always check image size not just in some cases.

Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=caa2fa2c69e760b3dad6358178ccbad39ba8a268
---

 libavcodec/rv10.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index a5181b3..d06a2fe 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -398,7 +398,8 @@ static int rv20_decode_picture_header(RVDecContext *rv)
         if(s->avctx->debug & FF_DEBUG_PICT_INFO){
             av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d\n", f, rpr_bits);
         }
-    } else if (av_image_check_size(s->width, s->height, 0, s->avctx) < 0)
+    }
+    if (av_image_check_size(s->width, s->height, 0, s->avctx) < 0)
         return AVERROR_INVALIDDATA;
 
     mb_pos = ff_h263_decode_mba(s);



More information about the ffmpeg-cvslog mailing list