avcodec/dca_lbr: Fix off by 1 error in freq check

Fixes out of array read
Fixes: 510/clusterfuzz-testcase-5737865715646464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-02-02 15:23:31 +01:00
parent 92cb9a3869
commit 61f70416f8
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ static int parse_tonal(DCALbrDecoder *s, int group)
break; // End of subframe
freq += diff - 2;
if (freq >> (5 - group) > s->nsubbands * 4 - 5) {
if (freq >> (5 - group) > s->nsubbands * 4 - 6) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid spectral line offset\n");
return -1;
}