mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-10 09:09:50 +00:00
avcodec/vc1_pred: Fix invalid shifts in scaleforopp()
Fixes: left shift of negative value -2
Fixes: 16964/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5757853565976576
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 ced9a1cd0a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2e527ed7b1
commit
838b359225
@ -191,9 +191,9 @@ static av_always_inline int scaleforopp(VC1Context *v, int n /* MV */,
|
||||
n >>= hpel;
|
||||
if (v->s.pict_type == AV_PICTURE_TYPE_B && !v->second_field && dir == 1) {
|
||||
if (dim)
|
||||
n = scaleforopp_y(v, n, dir) << hpel;
|
||||
n = scaleforopp_y(v, n, dir) * (1 << hpel);
|
||||
else
|
||||
n = scaleforopp_x(v, n) << hpel;
|
||||
n = scaleforopp_x(v, n) * (1 << hpel);
|
||||
return n;
|
||||
}
|
||||
if (v->s.pict_type != AV_PICTURE_TYPE_B)
|
||||
|
Loading…
Reference in New Issue
Block a user