Commit 25e93aac authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpeg4videodec: Fix runtime error: left shift of negative value -2650

Fixes: 674/clusterfuzz-testcase-6713275880308736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 4ea77448
......@@ -283,12 +283,12 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
ctx->sprite_shift[1] = 0;
break;
case 2:
s->sprite_offset[0][0] = (sprite_ref[0][0] << (alpha + rho)) +
s->sprite_offset[0][0] = (sprite_ref[0][0] * (1 << alpha + rho)) +
(-r * sprite_ref[0][0] + virtual_ref[0][0]) *
(-vop_ref[0][0]) +
(r * sprite_ref[0][1] - virtual_ref[0][1]) *
(-vop_ref[0][1]) + (1 << (alpha + rho - 1));
s->sprite_offset[0][1] = (sprite_ref[0][1] << (alpha + rho)) +
s->sprite_offset[0][1] = (sprite_ref[0][1] * (1 << alpha + rho)) +
(-r * sprite_ref[0][1] + virtual_ref[0][1]) *
(-vop_ref[0][0]) +
(-r * sprite_ref[0][0] + virtual_ref[0][0]) *
......
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