Browse Source

avcodec/mimic: Fix runtime error: left shift of negative value -1

Fixes: 1365/clusterfuzz-testcase-minimized-5624158450876416

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fc2c420b82)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0.8
Michael Niedermayer 8 years ago
parent
commit
c78e5a2cb4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mimic.c

+ 1
- 1
libavcodec/mimic.c View File

@@ -262,7 +262,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale)

coeff = vlcdec_lookup[num_bits][value];
if (pos < 3)
coeff <<= 4;
coeff *= 16;
else /* TODO Use >> 10 instead of / 1001 */
coeff = (coeff * qscale) / 1001;



Loading…
Cancel
Save