Browse Source

aacenc_ltp: fix out of bounds memory access

Discovered by Coverity.
tags/n3.0
Rostislav Pehlivanov 10 years ago
parent
commit
ed08cbd7b1
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      libavcodec/aacenc_ltp.c
  2. +1
    -1
      tests/fate/aac.mak

+ 1
- 1
libavcodec/aacenc_ltp.c View File

@@ -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.window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
if (sce->ics.ltp.lag) { 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)); memset(&sce->ics.ltp, 0, sizeof(LongTermPrediction));
} }
return; return;


+ 1
- 1
tests/fate/aac.mak View File

@@ -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: CMP = stddev
fate-aac-ltp-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav 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_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: SIZE_TOLERANCE = 3560
fate-aac-ltp-encode: FUZZ = 17 fate-aac-ltp-encode: FUZZ = 17




Loading…
Cancel
Save