aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g729dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-16 18:07:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-16 18:36:34 +0200
commitc963189bc2fcb879acff100be341222ee8aa850a (patch)
tree84d97ae808304aeb945aba1016ee7a8e512efdab /libavcodec/g729dec.c
parent31a45014f405e55862c9443934fa8eceb255789b (diff)
downloadffmpeg-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>
Diffstat (limited to 'libavcodec/g729dec.c')
-rw-r--r--libavcodec/g729dec.c2
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;