aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-28 21:54:02 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 01:05:28 +0200
commit362a98eea9b85324a733e653dbe06bea124014a9 (patch)
treeca4cb0e59aecd0e6656a063330e8c1b0ad24c341
parent5b6d056da8a1f403ef30106f7b5aee98a192a4f2 (diff)
downloadffmpeg-362a98eea9b85324a733e653dbe06bea124014a9.tar.gz
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/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c9e884f3d98df85bf7f2cf30d71877b22929fdcb) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/truemotion2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 245a32a8d7..4f0e52dbf7 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -272,7 +272,7 @@ static int tm2_read_deltas(TM2Context *ctx, int stream_id)
for (i = 0; i < d; i++) {
v = get_bits_long(&ctx->gb, mb);
if (v & (1 << (mb - 1)))
- ctx->deltas[stream_id][i] = v - (1 << mb);
+ ctx->deltas[stream_id][i] = v - (1U << mb);
else
ctx->deltas[stream_id][i] = v;
}