diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-02 19:08:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-08 19:45:47 +0200 |
commit | e1d4289596186980521a74e47486c25f93b9e3cf (patch) | |
tree | d94b35306c64dfd5fc3531926f0efdb17c85a28a | |
parent | c68a8137ce7322c815deeff0c0162bd574f39737 (diff) | |
download | ffmpeg-e1d4289596186980521a74e47486c25f93b9e3cf.tar.gz |
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: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 70832333bba3b915040f415548518e136b44280e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/shorten.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 1baa25f398..6850e5af15 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -172,7 +172,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; } } |