Browse Source

g729dec: initialize pitch_delay_int_prev to the minimum valid value.

This prevents an out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
c963189bc2
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/g729dec.c

+ 2
- 0
libavcodec/g729dec.c View File

@@ -371,6 +371,8 @@ static av_cold int decoder_init(AVCodecContext * avctx)

ctx->exc = &ctx->exc_base[PITCH_DELAY_MAX+INTERPOL_LEN];

ctx->pitch_delay_int_prev = PITCH_DELAY_MIN;

/* random seed initialization */
ctx->rand_value = 21845;



Loading…
Cancel
Save