Commit 5f5ada3d authored by Tim Walker's avatar Tim Walker Committed by Luca Barbato

shorten: Fix out-of-array read

pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too.
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent ed796fba
......@@ -303,7 +303,7 @@ static int decode_subframe_lpc(ShortenContext *s, int command, int channel,
} else {
/* fixed LPC coeffs */
pred_order = command;
if (pred_order > FF_ARRAY_ELEMS(fixed_coeffs)) {
if (pred_order >= FF_ARRAY_ELEMS(fixed_coeffs)) {
av_log(s->avctx, AV_LOG_ERROR, "invalid pred_order %d\n",
pred_order);
return AVERROR_INVALIDDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment