Merge commit '5f5ada3dbf97e306a74250ba8dcf8619ad59b020'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 11 Oct 2013 06:28:41 +0000 (08:28 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 11 Oct 2013 07:20:26 +0000 (09:20 +0200)
* commit '5f5ada3dbf97e306a74250ba8dcf8619ad59b020':
  shorten: Fix out-of-array read

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/shorten.c

index 082019b80209c13d7d5983460d791b35c65080bf..c25097c6e151dfc0d76842b744f9c0eabc0eb35b 100644 (file)
@@ -299,7 +299,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;