aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Walker <tdskywalker@gmail.com>2013-10-09 11:47:04 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-10-10 17:52:14 +0200
commit5f5ada3dbf97e306a74250ba8dcf8619ad59b020 (patch)
treefd474a6ae27aabeeb631e9bbb552c54c7a28c448
parented796fba761f4794bec7735d467c1b2c8e1858fe (diff)
downloadffmpeg-5f5ada3dbf97e306a74250ba8dcf8619ad59b020.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>
-rw-r--r--libavcodec/shorten.c2
1 files changed, 1 insertions, 1 deletions
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;