From: Michael Niedermayer Date: Wed, 12 Nov 2014 10:13:01 +0000 (+0100) Subject: on2avc: Fix out of array access X-Git-Tag: n2.5~28^2~86 X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=2fa6d21124bd2fc0b186290f5313179263bfcfb7 on2avc: Fix out of array access CC: libav-stable@libav.org Bug-Id: CID 1206648 --- diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c index 60f451c68f..deaa2b4c04 100644 --- a/libavcodec/on2avc.c +++ b/libavcodec/on2avc.c @@ -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;