Merge commit '54e03863691dcae73260f70108b3731b70773e7c' into release/0.10
[ffmpeg.git] / libavcodec / bink.c
index 16e3fd6..71b7d5f 100644 (file)
@@ -679,6 +679,9 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
         quant_idx = q;
     }
 
+    if (quant_idx >= 16)
+        return AVERROR_INVALIDDATA;
+
     quant = quant_matrices[quant_idx];
 
     block[0] = (block[0] * quant[0]) >> 11;