[FFmpeg-cvslog] alsdec: make sure no invalid opt_order stays in the context.

Michael Niedermayer git at videolan.org
Tue Mar 27 15:54:41 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 27 13:49:58 2012 +0200| [dfacef9e735461e72a05e683da06bda5ea9c5d8e] | committer: Michael Niedermayer

alsdec: make sure no invalid opt_order stays in the context.

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=dfacef9e735461e72a05e683da06bda5ea9c5d8e
---

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

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 3a4b6ec..f441bd0 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -664,6 +664,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
                                                 2, sconf->max_order + 1));
             *bd->opt_order       = get_bits(gb, opt_order_length);
             if (*bd->opt_order > sconf->max_order) {
+                *bd->opt_order = sconf->max_order;
                 av_log(avctx, AV_LOG_ERROR, "Predictor order too large!\n");
                 return -1;
             }



More information about the ffmpeg-cvslog mailing list