aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dca_lbr.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-02 15:23:31 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-06 10:17:13 +0100
commit7323a8ab2970d4b7c9b5a96738e4bf82c90459b1 (patch)
tree9889e330b4877f14c9b5094239593ea18963aa59 /libavcodec/dca_lbr.c
parentaa20863f4400a25bdbac36df94cdcb6e759a1c2b (diff)
downloadffmpeg-7323a8ab2970d4b7c9b5a96738e4bf82c90459b1.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>
Diffstat (limited to 'libavcodec/dca_lbr.c')
-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;
}