diff options
author | Tim Walker <tdskywalker@gmail.com> | 2013-10-09 11:47:04 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-10-10 17:52:14 +0200 |
commit | 5f5ada3dbf97e306a74250ba8dcf8619ad59b020 (patch) | |
tree | fd474a6ae27aabeeb631e9bbb552c54c7a28c448 | |
parent | ed796fba761f4794bec7735d467c1b2c8e1858fe (diff) | |
download | ffmpeg-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.c | 2 |
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; |