[FFmpeg-cvslog] svq3: Check negative mb_type to fix potential crash.

Baptiste Coudurier git at videolan.org
Sat Jun 4 06:39:59 CEST 2011


ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Wed May  4 18:45:36 2011 -0700| [93d06bd1df73861c73bc12c659aecdf404d1de2a] | committer: Diego Biurrun

svq3: Check negative mb_type to fix potential crash.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Diego Biurrun <diego at biurrun.de>

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

 libavcodec/svq3.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index b55fa52..7cde5e5 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;
             }



More information about the ffmpeg-cvslog mailing list