summaryrefslogtreecommitdiff
path: root/libavcodec/svq3.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-05-04 18:45:36 -0700
committerDiego Biurrun <diego@biurrun.de>2011-06-03 13:55:55 +0200
commit93d06bd1df73861c73bc12c659aecdf404d1de2a (patch)
treeaaea2fe8d27f7f3790f19986f96b280d7a59dff4 /libavcodec/svq3.c
parent8dfc6d1f7c33a482aba23e75870076f79b0ea485 (diff)
svq3: Check negative mb_type to fix potential crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r--libavcodec/svq3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index b55fa52fdb..7cde5e5552 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;
}