aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-27 13:49:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-27 13:50:41 +0200
commitdfacef9e735461e72a05e683da06bda5ea9c5d8e (patch)
tree8b0415221bcd8135608e036968d309cf2d9c876d
parent1acc553e5480cc16b6a9a193de581ec8fc01dff8 (diff)
downloadffmpeg-dfacef9e735461e72a05e683da06bda5ea9c5d8e.tar.gz
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@gmx.at>
-rw-r--r--libavcodec/alsdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 3a4b6ec56a..f441bd01ca 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;
}