[FFmpeg-devel] [PATCH] avcodec/alsdec: use correct variable when checking for overwrite
Paul B Mahol
onemda at gmail.com
Fri Jun 30 19:43:18 EEST 2017
Fixes #5297.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/alsdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index d95e30d..a925502 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -705,8 +705,8 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
} else {
*bd->opt_order = sconf->max_order;
}
- if (*bd->opt_order > bd->block_length) {
- *bd->opt_order = bd->block_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 AVERROR_INVALIDDATA;
}
--
2.9.3
More information about the ffmpeg-devel
mailing list