Commit 6dfda35d authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent f31ed8f3
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment