[FFmpeg-cvslog] g729dec: initialize pitch_delay_int_prev to the minimum valid value.

Michael Niedermayer git at videolan.org
Mon Apr 16 18:40:54 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 16 18:07:19 2012 +0200| [c963189bc2fcb879acff100be341222ee8aa850a] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c963189bc2fcb879acff100be341222ee8aa850a
---

 libavcodec/g729dec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index 2f70115..3a8f65a 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -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;
 



More information about the ffmpeg-cvslog mailing list