From 0fa8d19987f03444365a5c7f73b7ecf1520b011e Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Wed, 4 May 2011 18:45:36 -0700 Subject: [PATCH] In svq3 decoder, check negative mb_type, fix potential crash. Signed-off-by: Michael Niedermayer --- libavcodec/svq3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 16f483432f..75166066ff 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1049,7 +1049,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; }