Skip to content
Snippets Groups Projects
Commit 70832333 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/shorten: Fix undefined integer overflow

Fixes: signed integer overflow: 8454144 * 256 cannot be represented in type 'int'
Fixes: 8788/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5728205041303552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg


Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 652d7c63
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,7 @@ static void fix_bitshift(ShortenContext *s, int32_t *buffer)
buffer[i] = 0;
} else if (s->bitshift != 0) {
for (i = 0; i < s->blocksize; i++)
buffer[i] *= 1 << s->bitshift;
buffer[i] *= 1U << s->bitshift;
}
}
......
  • Auri @aurieh

    mentioned in commit c4b23793

    ·

    mentioned in commit c4b23793

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment