Commit ce6a1ff2 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/on2avc: Fix out of array access

Fixes CID1206648
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 61815ef8
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment