aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mimic.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-11 15:07:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-11 15:51:08 +0200
commitd9051f8f3e60768f68867c3e3116e980d855215a (patch)
tree8dc08313bee9e274f945452c014c6617aff2b562 /libavcodec/mimic.c
parent1795dccde0ad22fc8201142f92fb8d58c234f3e4 (diff)
downloadffmpeg-d9051f8f3e60768f68867c3e3116e980d855215a.tar.gz
avcodec/mimic: Fix runtime error: index 96 out of bounds for type 'const int8_t [64]'
Fixes: 1468/clusterfuzz-testcase-minimized-5235964056174592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r--libavcodec/mimic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 61ce1ce584..607dffa4a5 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -260,7 +260,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale)
/* FFmpeg's IDCT behaves somewhat different from the original code, so
* a factor of 4 was added to the input */
- coeff = vlcdec_lookup[num_bits][value];
+ coeff = ((int8_t*)vlcdec_lookup[num_bits])[value];
if (pos < 3)
coeff *= 16;
else /* TODO Use >> 10 instead of / 1001 */