diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-06-22 14:21:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-06 11:30:42 +0100 |
commit | bfbe5fbda835ab5d729ca1961d2d1489ddcd3ebc (patch) | |
tree | 4104fb3d50c82300f161bc65f6564506a065cf01 /libavcodec/vc1_block.c | |
parent | 62bcdd07b242baddaeef3ad14104b8b02ce11592 (diff) | |
download | ffmpeg-bfbe5fbda835ab5d729ca1961d2d1489ddcd3ebc.tar.gz |
avcodec/vc1_block: Fix invalid shifts in vc1_decode_i_blocks()
Fixes: left shift of negative value -9
Fixes: 15299/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSS2_fuzzer-5660922678345728
Fixes: 15557/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5673351911047168
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 c9415e815a996d287850a3572ce2c1d663b9f657)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vc1_block.c')
-rw-r--r-- | libavcodec/vc1_block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 7883e4f19c..94184b0873 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -2602,13 +2602,13 @@ static void vc1_decode_i_blocks(VC1Context *v) if (v->rangeredfrm) for (k = 0; k < 6; k++) for (j = 0; j < 64; j++) - v->block[v->cur_blk_idx][block_map[k]][j] <<= 1; + v->block[v->cur_blk_idx][block_map[k]][j] *= 2; vc1_put_blocks_clamped(v, 1); } else { if (v->rangeredfrm) for (k = 0; k < 6; k++) for (j = 0; j < 64; j++) - v->block[v->cur_blk_idx][block_map[k]][j] = (v->block[v->cur_blk_idx][block_map[k]][j] - 64) << 1; + v->block[v->cur_blk_idx][block_map[k]][j] = (v->block[v->cur_blk_idx][block_map[k]][j] - 64) * 2; vc1_put_blocks_clamped(v, 0); } |