diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-07-10 23:27:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:11:55 +0200 |
commit | a2a8b9470a912d6bb852d0eb6e3fc370eac82f07 (patch) | |
tree | 5c55d86e363d56c03175a5bc8ec47d76b5b8c9e3 | |
parent | 4ef3aafa835442a7499c4c455fcc9255aaa98a53 (diff) | |
download | ffmpeg-a2a8b9470a912d6bb852d0eb6e3fc370eac82f07.tar.gz |
avcodec/vc1_pred: Fix invalid shift in scaleforsame()
Fixes: left shift of negative value -1
Fixes: 15531/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5759556258365440
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 6dfda35dd29d2e2a86554d2c05d957a09ab79b0c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/vc1_pred.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1_pred.c b/libavcodec/vc1_pred.c index 54712f6b7a..aa8e402af9 100644 --- a/libavcodec/vc1_pred.c +++ b/libavcodec/vc1_pred.c @@ -178,7 +178,7 @@ static av_always_inline int scaleforsame(VC1Context *v, int i, int n /* MV */, brfd = FFMIN(v->brfd, 3); scalesame = ff_vc1_b_field_mvpred_scales[0][brfd]; - n = (n * scalesame >> 8) << hpel; + n = (n * scalesame >> 8) * (1 << hpel); return n; } |