Commit 606c7148 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/shorten: Fix undefined shift in fix_bitshift()

Fixes: left shift of negative value -9
Fixes: 8571/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5715966875926528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a711efe9
...@@ -177,7 +177,7 @@ static void fix_bitshift(ShortenContext *s, int32_t *buffer) ...@@ -177,7 +177,7 @@ static void fix_bitshift(ShortenContext *s, int32_t *buffer)
buffer[i] = 0; buffer[i] = 0;
} else if (s->bitshift != 0) { } else if (s->bitshift != 0) {
for (i = 0; i < s->blocksize; i++) for (i = 0; i < s->blocksize; i++)
buffer[i] <<= s->bitshift; buffer[i] *= 1 << s->bitshift;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment