aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Walker <tdskywalker@gmail.com>2013-10-09 11:47:04 +0200
committerTim Walker <tdskywalker@gmail.com>2014-01-06 16:36:56 +0100
commita0866c71293db80f271f11176eae72217d773e9a (patch)
treebc75ce7ebe06f2fa272a9c4fbcf8ebe37b9eb8dd
parent65830277d2d2ee3658e1f070a61044fff261ed3e (diff)
downloadffmpeg-a0866c71293db80f271f11176eae72217d773e9a.tar.gz
shorten: Fix out-of-array read
pred_order == FF_ARRAY_ELEMS(fixed_coeffs) is invalid too. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit 5f5ada3dbf97e306a74250ba8dcf8619ad59b020) Signed-off-by: Tim Walker <tdskywalker@gmail.com>
-rw-r--r--libavcodec/shorten.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index ea2277218d..22976e0137 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -307,7 +307,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;