diff options
author | Michael Niedermayer <[email protected]> | 2018-06-05 13:15:34 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2018-07-16 19:06:27 +0200 |
commit | c2d16aafbb1527d4b47ecfad659a381c22a017ba (patch) | |
tree | 156e3ead5a8dfe1f3271c8efca75a005f4defcf2 | |
parent | b7134d7fb679df78069648d0fb7bc54a59f9f557 (diff) |
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/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 606c7148231404544005c0827b83c165dd6b39a8)
Signed-off-by: Michael Niedermayer <[email protected]>
-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 5f4e5ed9bc..5a14e8e5bf 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -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] <<= s->bitshift; + buffer[i] *= 1 << s->bitshift; } } |