aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-02 15:23:31 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-08 20:32:01 +0100
commitc26c8bb23a51cf6392b3a825ca48b8bd4c87b582 (patch)
treeaa392dacb15639c718def711c5822af06bf97e76
parente23768b8ffc3d17af1c0cac33ea9c8b3a6a50437 (diff)
downloadffmpeg-c26c8bb23a51cf6392b3a825ca48b8bd4c87b582.tar.gz
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> (cherry picked from commit 61f70416f8542cc86c84ae6e0342ba10a35d7cba) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/dca_lbr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dca_lbr.c b/libavcodec/dca_lbr.c
index 342603c7d4..56c5f40982 100644
--- a/libavcodec/dca_lbr.c
+++ b/libavcodec/dca_lbr.c
@@ -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;
}