aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-09-27 17:01:38 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-06 20:30:57 +0100
commit7187b14d9bacebf9ea41596d0977a6ef114c416f (patch)
treeb7b7a201133d9700b9941285eea3d3f60a01e03e
parent79532fa945a31d1727b966f6750f45092d7bed9e (diff)
downloadffmpeg-7187b14d9bacebf9ea41596d0977a6ef114c416f.tar.gz
avcodec/g729postfilter: Fix undefined intermediate pointers
Fixes: index -49 out of bounds for type 'int16_t [192]' Fixes: 17689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5756275014500352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0c61661a2cbe1b8b284c80ada1c2fdddf4992cad) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/g729postfilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/g729postfilter.c b/libavcodec/g729postfilter.c
index 3e5519256b..9b0dea6719 100644
--- a/libavcodec/g729postfilter.c
+++ b/libavcodec/g729postfilter.c
@@ -200,8 +200,8 @@ static int16_t long_term_filter(AudioDSPContext *adsp, int pitch_delay_int,
}
if (corr_int_num) {
/* Compute denominator of pseudo-normalized correlation R'(0). */
- corr_int_den = adsp->scalarproduct_int16(sig_scaled - best_delay_int + RES_PREV_DATA_SIZE,
- sig_scaled - best_delay_int + RES_PREV_DATA_SIZE,
+ corr_int_den = adsp->scalarproduct_int16(sig_scaled + RES_PREV_DATA_SIZE - best_delay_int,
+ sig_scaled + RES_PREV_DATA_SIZE - best_delay_int,
subframe_size);
/* Compute signals with non-integer delay k (with 1/8 precision),