avcodec/on2avc: Fix out of array access
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 2 Jul 2014 18:22:12 +0000 (20:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 2 Jul 2014 18:22:12 +0000 (20:22 +0200)
Fixes CID1206648

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/on2avc.c

index 4f30606..ab6048b 100644 (file)
@@ -172,7 +172,7 @@ static int on2avc_decode_band_scales(On2AVCContext *c, GetBitContext *gb)
             } else {
                 scale += get_vlc2(gb, c->scale_diff.table, 9, 3) - 60;
             }
-            if (scale < 0 || scale > 128) {
+            if (scale < 0 || scale > 127) {
                 av_log(c->avctx, AV_LOG_ERROR, "Invalid scale value %d\n",
                        scale);
                 return AVERROR_INVALIDDATA;