From 5f5ada3dbf97e306a74250ba8dcf8619ad59b020 Mon Sep 17 00:00:00 2001 From: Tim Walker Date: Wed, 9 Oct 2013 11:47:04 +0200 Subject: [PATCH] shorten: Fix out-of-array read pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too. Signed-off-by: Luca Barbato --- libavcodec/shorten.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 5ca38c63d6..31251ac95b 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -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;