From: Baptiste Coudurier Date: Thu, 5 May 2011 01:45:36 +0000 (-0700) Subject: svq3: Check negative mb_type to fix potential crash. X-Git-Tag: v0.7rc1~171 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93d06bd1df73861c73bc12c659aecdf404d1de2a;p=platform%2Fupstream%2Flibav.git svq3: Check negative mb_type to fix potential crash. Signed-off-by: Michael Niedermayer Signed-off-by: Diego Biurrun --- diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index b55fa52fd..7cde5e555 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1037,7 +1037,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, } else if (s->pict_type == AV_PICTURE_TYPE_B && mb_type >= 4) { mb_type += 4; } - if (mb_type > 33 || svq3_decode_mb(svq3, mb_type)) { + if ((unsigned)mb_type > 33 || svq3_decode_mb(svq3, mb_type)) { av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding MB %d %d\n", s->mb_x, s->mb_y); return -1; }