aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-08 15:46:55 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 12:20:16 +0200
commitf47b687067aa5cde110439d5809060d40a88a8bf (patch)
tree426761a3475ad98e303a26aeb31325dd23f16d79
parent14da95af46af500197ca559dbc36ace7a22819ea (diff)
downloadffmpeg-f47b687067aa5cde110439d5809060d40a88a8bf.tar.gz
avcodec/bmvvideo: Fix runtime error: left shift of 137 by 24 places cannot be represented in type 'int'
Fixes: 1411/clusterfuzz-testcase-minimized-5776085184675840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 29692023b2f1e0580a4065f4c9b62bafd89ab337) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/bmvvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bmvvideo.c b/libavcodec/bmvvideo.c
index 97f850dbae..cf7f0a0501 100644
--- a/libavcodec/bmvvideo.c
+++ b/libavcodec/bmvvideo.c
@@ -107,7 +107,7 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
if (src < source || src >= source_end)
return AVERROR_INVALIDDATA;
shift += 2;
- val |= *src << shift;
+ val |= (unsigned)*src << shift;
if (*src & 0xC)
break;
}