summaryrefslogtreecommitdiff
path: root/libavcodec/rv10.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-15 02:16:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-15 02:17:26 +0100
commitcaa2fa2c69e760b3dad6358178ccbad39ba8a268 (patch)
tree289d331ca12316ee481c912b430838dcd871da19 /libavcodec/rv10.c
parenta3cb7f992f88fcfa524bd9cd08b28e09d6718f75 (diff)
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@gmx.at>
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r--libavcodec/rv10.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index a5181b38a6..d06a2fe1b2 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);