summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-12-03 23:12:37 +0000
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-12-03 23:12:37 +0000
commited08cbd7b172a1dba74230527ef761aafaf2fcce (patch)
tree7ea9c835fe5246ffcd97cd1bc491909430d75e55
parent4e31176e145fe532bf9d9793ed562ab9373f1de7 (diff)
aacenc_ltp: fix out of bounds memory access
Discovered by Coverity.
-rw-r--r--libavcodec/aacenc_ltp.c2
-rw-r--r--tests/fate/aac.mak2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c
index e19f3cc2d7..1917ee979e 100644
--- a/libavcodec/aacenc_ltp.c
+++ b/libavcodec/aacenc_ltp.c
@@ -167,7 +167,7 @@ void ff_aac_search_for_ltp(AACEncContext *s, SingleChannelElement *sce,
if (sce->ics.window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
if (sce->ics.ltp.lag) {
- memset(&sce->lcoeffs[0], 0.0f, 3072*sizeof(sce->lcoeffs[0]));
+ memset(&sce->ltp_state[0], 0, 3072*sizeof(sce->ltp_state[0]));
memset(&sce->ics.ltp, 0, sizeof(LongTermPrediction));
}
return;
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 7a6c734bf7..09777af57b 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -209,7 +209,7 @@ fate-aac-ltp-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-re
fate-aac-ltp-encode: CMP = stddev
fate-aac-ltp-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
fate-aac-ltp-encode: CMP_SHIFT = -4096
-fate-aac-ltp-encode: CMP_TARGET = 1284
+fate-aac-ltp-encode: CMP_TARGET = 1273
fate-aac-ltp-encode: SIZE_TOLERANCE = 3560
fate-aac-ltp-encode: FUZZ = 17