[FFmpeg-cvslog] avcodec/bmvvideo: Fix runtime error: left shift of 137 by 24 places cannot be represented in type 'int'

Michael Niedermayer git at videolan.org
Mon May 8 17:06:47 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon May  8 15:46:55 2017 +0200| [29692023b2f1e0580a4065f4c9b62bafd89ab337] | committer: Michael Niedermayer

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=29692023b2f1e0580a4065f4c9b62bafd89ab337
---

 libavcodec/bmvvideo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/bmvvideo.c b/libavcodec/bmvvideo.c
index 78a0945b7a..679b14208a 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;
                 }



More information about the ffmpeg-cvslog mailing list