diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-16 18:07:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-16 18:36:34 +0200 |
commit | c963189bc2fcb879acff100be341222ee8aa850a (patch) | |
tree | 84d97ae808304aeb945aba1016ee7a8e512efdab | |
parent | 31a45014f405e55862c9443934fa8eceb255789b (diff) | |
download | ffmpeg-c963189bc2fcb879acff100be341222ee8aa850a.tar.gz |
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>
-rw-r--r-- | libavcodec/g729dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c index 2f70115814..3a8f65a3c2 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; |