[FFmpeg-cvslog] avcodec/cfhd: Use the actual count instead of the expected in peak_table()

Michael Niedermayer git at videolan.org
Mon Aug 20 03:33:33 EEST 2018


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Aug 13 00:58:32 2018 +0200| [77429b4217bd2366c5f05479086b3f9613d640ee] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=77429b4217bd2366c5f05479086b3f9613d640ee
---

 libavcodec/cfhd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 



More information about the ffmpeg-cvslog mailing list