[FFmpeg-cvslog] avcodec/pictordec: Fix runtime error: left shift of 805306368 by 2 places cannot be represented in type 'int'

Michael Niedermayer git at videolan.org
Tue Mar 14 23:50:29 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Mar 13 20:45:07 2017 +0100| [0728d9a281068add5898a8b51cd9c6f3b973ea31] | committer: Michael Niedermayer

avcodec/pictordec: Fix runtime error: left shift of 805306368 by 2 places cannot be represented in type 'int'

Fixes: 823/clusterfuzz-testcase-6727060074528768

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=0728d9a281068add5898a8b51cd9c6f3b973ea31
---

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

diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 2dbc040..8b075bf 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -62,7 +62,7 @@ static void picmemset(PicContext *s, AVFrame *frame, unsigned value, int run,
 {
     uint8_t *d;
     int shift = *plane * bits_per_plane;
-    int mask  = ((1 << bits_per_plane) - 1) << shift;
+    unsigned mask  = ((1 << bits_per_plane) - 1) << shift;
     value   <<= shift;
 
     while (run > 0) {



More information about the ffmpeg-cvslog mailing list