Commit 61f70416 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 92cb9a38
......@@ -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;
}
......
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