Commit c9e884f3 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/truemotion2: Fix runtime error: left shift of 1 by 31 places cannot be...

avcodec/truemotion2: Fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Fixes part of: 1888/clusterfuzz-testcase-minimized-5237704826552320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 7c845450
...@@ -272,7 +272,7 @@ static int tm2_read_deltas(TM2Context *ctx, int stream_id) ...@@ -272,7 +272,7 @@ static int tm2_read_deltas(TM2Context *ctx, int stream_id)
for (i = 0; i < d; i++) { for (i = 0; i < d; i++) {
v = get_bits_long(&ctx->gb, mb); v = get_bits_long(&ctx->gb, mb);
if (v & (1 << (mb - 1))) if (v & (1 << (mb - 1)))
ctx->deltas[stream_id][i] = v - (1 << mb); ctx->deltas[stream_id][i] = v - (1U << mb);
else else
ctx->deltas[stream_id][i] = v; ctx->deltas[stream_id][i] = v;
} }
......
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