aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-08-13 00:58:32 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-08-20 02:32:41 +0200
commit77429b4217bd2366c5f05479086b3f9613d640ee (patch)
tree56d0315d68c47b61ee6341d21337b28522167318
parent2c1613ac94d07fd85e8831bb7aa7eb4bec707285 (diff)
downloadffmpeg-77429b4217bd2366c5f05479086b3f9613d640ee.tar.gz
avcodec/cfhd: Use the actual count instead of the expected in peak_table()
Fixes: out of array access (no testcase) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/cfhd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 1959762f0e..846d334b9b 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -697,7 +697,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
goto end;
}
if (s->peak.level)
- peak_table(coeff_data - expected, &s->peak, expected);
+ peak_table(coeff_data - count, &s->peak, count);
if (s->difference_coding)
difference_coding(s->plane[s->channel_num].subband[s->subband_num_actual], highpass_width, highpass_height);