diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-26 20:27:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-28 01:13:52 +0100 |
commit | 25e93aacc2142f3b57f1e63c67ca46d304f154ef (patch) | |
tree | 58707463d1fb79c481c8571487dcdb2e99b73b1a /libavcodec | |
parent | 4ea7744859dc3d214ef13e920f5d07b070920e3f (diff) | |
download | ffmpeg-25e93aacc2142f3b57f1e63c67ca46d304f154ef.tar.gz |
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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg4videodec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index dac9538436..9f9374d550 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -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]) * |