g729dec: initialize pitch_delay_int_prev to the minimum valid value.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Apr 2012 16:07:19 +0000 (18:07 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Apr 2012 16:36:34 +0000 (18:36 +0200)
This prevents an out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/g729dec.c

index 2f70115..3a8f65a 100644 (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;